At this point, $result would be equal to "uppercase".  I feel like
this is a really kludgey way to accomplish this.  Is there a better way?
Not tested it, but max() should work as the first parameter can be an
array:
http://uk3.php.net/max

Except he's looking for the key and not the value, which max() would return. Come to think of it, the solution I provided does the same thing.

Untested but one of the below should work:

arsort($chance);
$lastItem = key( $chance[( count( $chance ) - 1 )]);

OR

arsort($chance);
$lastItem = key( end( $chance ));

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

Reply via email to