|
Posted by spwpreston on 10/27/06 21:00
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
Navigation:
[Reply to this message]
|