Hi,
I need to get the highest value of a hash. I first just wanted to do an
arsort and then access the first value with $data[0], which didnīt work. I
guess you canīt access associative arrays by index.
So I found this way to do it (as the $data array needs to remain unchanged):
$temp=$data;
arsort ($temp);
$max=reset($temp);
Is there really no shorter way to do it??
Pat
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]