note 9924 deleted from function.shuffle by aidan
| From: | aidan@php.net | Date: | Thu, 26 Aug 2004 22:34:38 +0000 |
| Subject: | note 9924 deleted from function.shuffle by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-75372@lists.php.net to get a copy of this message | ||
Note Submitter: daveb at creativenet dot net
----
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);