[snip]
>> $fruit = array(orange,orange,apple,bananna,orange,apple,pear);
>> 
>> How could I get the number of elements from $fruit where the value is
>> "orange"?
[/snip]

>From http://www.php.net/array_keys with additions;

$array = array("blue", "red", "green", "blue", "blue");
$countArray = count((array_keys($array, "blue")));
echo $countArray . "\n";
3

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to