array_count_values Problem
| From: | Alice Wei | Date: | Tue, 12 Jan 2010 14:09:45 +0000 |
| Subject: | array_count_values Problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-301020@lists.php.net to get a copy of this message | ||
Hi,
I have a code in the following, after investigating more closely on how to use
array_count_values():
//Calculate the number of elements in array
$total_num = count($friend_from);
$total_num2 = count(array_unique($friend_from));
for ($i=0;$i<=$total_num2;$i++) echo $friend_from[$i] . " " .
array_count_values($friend_from[$i]) . "\n";
Neither of these two numbers, $total_num and $total_num2 are 0, but I only get something like
this:
Monroe, IN
Cherokee, OK
Cherokee, OK
Cleveland, OK
Greer, OK
How come that I cannot get it to print out the individual array_count_values? Have I missed
something here?
Thanks for your help.
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/196390707/direct/01/