note 105222 added to function.max
| From: | sun at drupal dot org | Date: | Wed, 03 Aug 2011 18:25:03 +0000 |
| Subject: | note 105222 added to function.max | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-182189@lists.php.net to get a copy of this message | ||
Note that max() throws a warning if the array is empty:
<?php
$a = array();
max($a);
// Warning: max(): Array must contain at least one element
?>
So make sure your data isn't empty.
----
Server IP: 69.147.83.197
Probable Submitter: 91.20.211.87
----
Manual Page -- http://www.php.net/manual/en/function.max.php
Edit -- https://master.php.net/note/edit/105222
Del: integrated -- https://master.php.net/note/delete/105222/integrated
Del: useless -- https://master.php.net/note/delete/105222/useless
Del: bad code -- https://master.php.net/note/delete/105222/bad+code
Del: spam -- https://master.php.net/note/delete/105222/spam
Del: non-english -- https://master.php.net/note/delete/105222/non-english
Del: in docs -- https://master.php.net/note/delete/105222/in+docs
Del: other reasons-- https://master.php.net/note/delete/105222
Reject -- https://master.php.net/note/reject/105222
Search -- https://master.php.net/manage/user-notes.php