I have an array displaying results as below:
Array ( [0] => 71 [1] => 56 [2] => 64 [3] => 82 [4] => 90 [5] => 80 [6
Try this:
$arr=array(); for ($i=0;$i<5;$i++) { $arr[i]=$items[array_rand($items)]; }
$arr contains the result
$arr