mixed array_rand ( array arr [, int amount] ) : array_rand « Data Structure « PHP






mixed array_rand ( array arr [, int amount] )

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








Related examples in the same category

1.A Random-Image Script Using array_rand()
2.array_rand