Display the drop-down list

array_rand()

« array_push | array_reduce »
<?php
$mixed 
array_rand (
    
// array $array
    
  // [int $num = 1]
);
?>
Result
$mixed = [
  
=> 1,
  
=> 2,
]
Examples
#1 array_rand  ([=> "Neo"=> "Morpheus"=> "Trinity"=> "Cypher"=> "Tank"],
 
2)
See also
shuffle