note 87619 deleted from function.array-rand by danbrown
| From: | danbrown@php.net | Date: | Fri, 12 Dec 2008 23:00:38 +0000 |
| Subject: | note 87619 deleted from function.array-rand by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-148108@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
vista_ at live dot se:
Your function does not account for the situation when $limit is greater than one.
If $limit is N, where N is an integer greater than one, then your function would attempt to return
$array[X], where X is an array of size N. An array is not a valid array key/index.