>In a message dated 2/24/2003 12:05:09 AM Pacific Standard Time, >[EMAIL PROTECTED] writes: > >I wish to fine the most occurringest value in an array. eg: > >$arr = array('dog', 'cat', 'dog', 'zebra', 'cat', 'dog', 'dog', 'dog'); > >if I use array_count_values it gives "dog => 5" >I would like to get 'dog' and '5' into a $variable.
array_count_values gives you an array with the values for keys and the count of each value as the value ($array['dog']=5). You can then take that array apart using extract. Janet -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php