I'm trying to learn about shuffling an array.
I've read a bit in the manual about shuffle and searched other posts, but haven't found anything yet relating to my problem.
If I try the example in the manual on shuffle, I seem to get almost the same result every time:
for($i=0;$i<200;$i++){
$numbers = range(1,5);
srand((float)microtime()*1000000);
shuffle($numbers);
foreach ($numbers as $number) {
echo "$number ";
}
echo "<br>";
}
yields a list comprising of either 13452 or 21453 - no other variations. Am I doing something wrong?
Thanks for your time.
mrob