note 88298 added to function.array-rand

From: Date: Mon, 19 Jan 2009 17:23:05 +0000
Subject: note 88298 added to function.array-rand
Groups: php.notes 
Request: Send a blank email to php-notes+get-149470@lists.php.net to get a copy of this message
There is a flaw in my previous post's code causing an error should $count equal zero. The expression "$count >= 0" should be changed to "$count > 0". This should return an empty array if the user requests zero items. ---- Server IP: 66.207.199.35 Probable Submitter: 206.75.15.10 ---- Manual Page -- http://www.php.net/manual/en/function.array-rand.php Edit -- https://master.php.net/note/edit/88298 Del: integrated -- https://master.php.net/note/delete/88298/integrated Del: useless -- https://master.php.net/note/delete/88298/useless Del: bad code -- https://master.php.net/note/delete/88298/bad+code Del: spam -- https://master.php.net/note/delete/88298/spam Del: non-english -- https://master.php.net/note/delete/88298/non-english Del: in docs -- https://master.php.net/note/delete/88298/in+docs Del: other reasons-- https://master.php.net/note/delete/88298 Reject -- https://master.php.net/note/reject/88298 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#149470) next »