note 75208 added to function.max
| From: | johnmott59 at hotmail dot com | Date: | Thu, 17 May 2007 19:35:22 +0000 |
| Subject: | note 75208 added to function.max | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-126676@lists.php.net to get a copy of this message | ||
To find the maximum value from a set of 1-dimensional arrays, do this:
$d1 = array(450,420,440,430,421);
$d2 = array(460,410,410,430,413,375,256,411,656);
$d3 = array(430,440,470,435,434,255,198);
$t = max(max($d1),max($d2),max($d3));
// $t is 656
The inner max() functions operate on the arrays, the outer max compares the numeric results of the
inner ones.
----
Server IP: 69.39.81.135
Probable Submitter: 68.32.106.189
----
Manual Page -- http://www.php.net/manual/en/function.max.php
Edit -- https://master.php.net/note/edit/75208
Del: integrated -- https://master.php.net/note/delete/75208/integrated
Del: useless -- https://master.php.net/note/delete/75208/useless
Del: bad code -- https://master.php.net/note/delete/75208/bad+code
Del: spam -- https://master.php.net/note/delete/75208/spam
Del: non-english -- https://master.php.net/note/delete/75208/non-english
Del: in docs -- https://master.php.net/note/delete/75208/in+docs
Del: other reasons-- https://master.php.net/note/delete/75208
Reject -- https://master.php.net/note/reject/75208
Search -- https://master.php.net/manage/user-notes.php