note 93001 deleted from function.max by danbrown
| From: | danbrown@php.net | Date: | Wed, 19 Aug 2009 07:47:17 +0000 |
| Subject: | note 93001 deleted from function.max by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-159626@lists.php.net to get a copy of this message | ||
Note Submitter: christiaan at baartse dot nl
----
@stuff at necr0manzer dot de
Wouldn't
$key = array_search(max($array), $array);
yield the same as your
$key = max_key($array);
and if you really want a function for it
function max_key($array) {
return array_search(max($array), $array);
}