note 87619 added to function.array-rand

From: Date: Fri, 12 Dec 2008 23:00:06 +0000
Subject: note 87619 added to function.array-rand
Groups: php.notes 
Request: Send a blank email to php-notes+get-148107@lists.php.net to get a copy of this message
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. ---- Server IP: 66.207.199.35 Probable Submitter: 206.75.15.5 ---- Manual Page -- http://www.php.net/manual/en/function.array-rand.php Edit -- https://master.php.net/note/edit/87619 Del: integrated -- https://master.php.net/note/delete/87619/integrated Del: useless -- https://master.php.net/note/delete/87619/useless Del: bad code -- https://master.php.net/note/delete/87619/bad+code Del: spam -- https://master.php.net/note/delete/87619/spam Del: non-english -- https://master.php.net/note/delete/87619/non-english Del: in docs -- https://master.php.net/note/delete/87619/in+docs Del: other reasons-- https://master.php.net/note/delete/87619 Reject -- https://master.php.net/note/reject/87619 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#148107) next »