i have the array
var_dump result–
array
6 => int 7
7 => int 8
9 => int 10
11 => int 12
I want to find out any random number from it using
$avil=array_rand($arr);
but it give me results among 6,7,9,11
But i need results from 7,8,10,12
How to proceed
array_rand returns the key for the array
So you’ll get the value using
$arr[$avil]