note 92015 deleted from function.max by danbrown
| From: | danbrown@php.net | Date: | Sun, 05 Jul 2009 14:31:24 +0000 |
| Subject: | note 92015 deleted from function.max by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157938@lists.php.net to get a copy of this message | ||
Note Submitter: Howard Yeend
----
re: doublemax:
<?
function doublemax($arr) {
$val = max($arr);
$key = array_search($val,$arr);
return array($key=>$val);
}
?>
should be a lot faster than joan dot codina or michaelangel0's functions, as mine uses inbuilt
search rather than home brewed.