Randomizing an Array Using shuffle(), kshuffle(), and array_rand()
<?php
$nums = array(15, 2.2, -4, 2.3, 0);
shuffle($nums);
printf("<pre>%s</pre>\n", var_export($nums, TRUE));
shuffle($nums);
printf("<pre>%s</pre>\n", var_export($nums, TRUE));
shuffle($nums);
printf("<pre>%s</pre>\n", var_export($nums, TRUE));
?>
Related examples in the same category