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
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
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] . "
> echo $stuff[nuts];
It should work, but it's becomg a depreciated practice and may break in
future versions. Always quote a non-numeric array key.
Beyond that, use print_r($array) and see if there is a "nuts" key in there
at all.
--
Plutarck
Should be working on something...
...but forgot wha
dunno, what doesn't work exactly
but what if you try:
$array = split ("\n", $contents);
$stuff = array_count_values ($array);
echo $stuff["nuts"];
-elias
http://www.kameelah.org/eassoft
""Matthew Luchak"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
can som
can someone give a quick hint as to why this does not work:
$array = split ("\n", $contents);
$stuff = array_count_values ($array);
echo $stuff[nuts];
or even:
$array = array (split ("\n", $contents));
$stuff = array_count_values ($array);
echo $stuff[nuts];
thnx...
matthew
--
PHP
6 matches
Mail list logo