note 75690 added to function.array-rand
| From: | HayleyWatson at osu1 dot php dot net | Date: | Tue, 12 Jun 2007 03:38:53 +0000 |
| Subject: | note 75690 added to function.array-rand | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-127409@lists.php.net to get a copy of this message | ||
To add to asp at cyberlin dot eu's comment. Not only will it return NULL but it will also
trigger a warning, and not only if the number of elements requested is too large to be satisfied by
the array but also if it is zero. The warning message sums the situation up: "Second argument
has to be between 1 and the number of elements [inclusive] in the array".
----
Server IP: 203.89.181.184
Probable Submitter: 60.234.168.92
----
Manual Page -- http://www.php.net/manual/en/function.array-rand.php
Edit -- https://master.php.net/note/edit/75690
Del: integrated -- https://master.php.net/note/delete/75690/integrated
Del: useless -- https://master.php.net/note/delete/75690/useless
Del: bad code -- https://master.php.net/note/delete/75690/bad+code
Del: spam -- https://master.php.net/note/delete/75690/spam
Del: non-english -- https://master.php.net/note/delete/75690/non-english
Del: in docs -- https://master.php.net/note/delete/75690/in+docs
Del: other reasons-- https://master.php.net/note/delete/75690
Reject -- https://master.php.net/note/reject/75690
Search -- https://master.php.net/manage/user-notes.php