You are here: Re: hashing and indexing « PHP Programming Language « IT news, forums, messages
Re: hashing and indexing

Posted by Peter Fox on 10/28/06 09:13

Following on from 's message. . .

See array_count_values() in the manual. I Believe this is exactly what
you're looking for.



>
>
>hello,
>
> i am trying to count all of the words in a string, and am trying to
>determine the best data structure for this.
>
> i would like to be able to do something like
>
> $arr_text = explode(" ", $text);
>
> then, i want to count each unique word in $arr_text
>
> i tried using the words as the array offsets, and of course i found
>that this is illegal.
>
> is there a php data structure which can accomplish this for me?
>
> something like python's dictionary data structure would be perfect.
>
>thank you so much for reading.
>
>-d
>

--
PETER FOX Not the same since the porcelain business went down the pan
peterfox@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация