note 93883 added to function.min
| From: | Err at osu1 dot php dot net | Date: | Mon, 05 Oct 2009 11:32:58 +0000 |
| Subject: | note 93883 added to function.min | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-161345@lists.php.net to get a copy of this message | ||
When using a variable with an array that has a list of numbers, put just the variable in min().
Don't use integer index's. Seems pretty straight forward now, but I wasn't used to
just putting down the variable for an array in functions.
<?php
$list = array(9,5,4,6,2,7);
echo min($list); // display 2
?>
----
Server IP: 69.147.83.197
Probable Submitter: 72.181.251.145
----
Manual Page -- http://www.php.net/manual/en/function.min.php
Edit -- https://master.php.net/note/edit/93883
Del: integrated -- https://master.php.net/note/delete/93883/integrated
Del: useless -- https://master.php.net/note/delete/93883/useless
Del: bad code -- https://master.php.net/note/delete/93883/bad+code
Del: spam -- https://master.php.net/note/delete/93883/spam
Del: non-english -- https://master.php.net/note/delete/93883/non-english
Del: in docs -- https://master.php.net/note/delete/93883/in+docs
Del: other reasons-- https://master.php.net/note/delete/93883
Reject -- https://master.php.net/note/reject/93883
Search -- https://master.php.net/manage/user-notes.php