$arr3=array(12,23,45,67,89,99);
foreach ($arr3 as $a)
echo " ".$a;
$arr4=array_rand($arr3);
echo"<br>key is $arr4";
$arr4=array_rand($arr3,2);
echo "<br>Now
the key are ";
foreach ($arr4 as $a)
echo " ".$a;
?>
Output
12 23 45
67 89 99
key
is 2
Now
the key are 0 2
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.