shuffle( ) function randomizes the position of the elements : shuffle « Data Structure « PHP






shuffle( ) function randomizes the position of the elements

 
<?
    $natural_born_killers = array("lions", "tigers", "bears", "kittens");
    shuffle($natural_born_killers);
?>
  
  








Related examples in the same category

1.Randomizing an Array Using shuffle(), kshuffle(), and array_rand()
2.shuffle.php