RE: [PHP] array_count_values Problem

2010-01-12 Thread Alice Wei
unt[$friend_location]; echo $count_friend . "\n"; } Thanks again. Alice > Date: Tue, 12 Jan 2010 13:17:57 -0300 > Subject: Re: [PHP] array_count_values Problem > From: tapi...@gmail.com > To: aj...@alumni.iu.edu > CC: php-general@lists.php.net > > Hi, > > Th

Re: [PHP] array_count_values Problem

2010-01-12 Thread Jonathan Tapicer
Hi, The function array_count_values returns an array (http://php.net/array_count_values). So you are using it the wrong way, you should assign the return value to a variable and then access some index. Regards, Jonathan On Tue, Jan 12, 2010 at 11:09 AM, Alice Wei wrote: > > Hi, > >  I have a c

[PHP] array_count_values Problem

2010-01-12 Thread Alice Wei
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] . "