note 66913 added to function.shuffle

From: Date: Thu, 01 Jun 2006 00:08:51 +0000
Subject: note 66913 added to function.shuffle
Groups: php.notes 
Request: Send a blank email to php-notes+get-112687@lists.php.net to get a copy of this message
I think Benton at GoatRider dot com above had his explanation right, but left a bit of the code wrong. He left $i+1 as the second argument to mt_rand, even though he told us that was wrong. The second argument to mt_rand should be $i because mt_rand generates numbers including its bounds. ---- Server IP: 64.71.164.2 Probable Submitter: 70.178.221.89 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.shuffle.php Edit -- http://master.php.net/note/edit/66913 Del: integrated -- http://master.php.net/note/delete/66913/integrated Del: useless -- http://master.php.net/note/delete/66913/useless Del: bad code -- http://master.php.net/note/delete/66913/bad+code Del: spam -- http://master.php.net/note/delete/66913/spam Del: non-english -- http://master.php.net/note/delete/66913/non-english Del: in docs -- http://master.php.net/note/delete/66913/in+docs Del: other reasons-- http://master.php.net/note/delete/66913 Reject -- http://master.php.net/note/reject/66913 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#112687) next »