note 9924 added to shuffle
| From: | daveb at creativenet dot net | Date: | Fri, 01 Dec 2000 22:19:59 +0000 |
| Subject: | note 9924 added to shuffle | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8335@lists.php.net to get a copy of this message | ||
It says you have to seed the generator with srand, but just for shuffling an array of fruits for
example, you just do shuffle...
$fruits = Array(
"apples" => "juicy",
"lemons" => "sour",
"tangerines" => "sweet");
shuffle($fruits);
print join("", $fruits);
http://www.php.net/manual/function.shuffle.php