My code:
$input = array("1", "2", "3", "4", "5", "6", "8", "15", "22");
$value1=$input[array_rand($input)];
I want to randomize given numbers and get just one numbers of them back to "$input", but I got an error : "PHP Warning: array_rand() expects parameter 1 to be array, boolean given in...
Line where this error is triggered is here:
$value1=$input[array_rand($input)];
How to fix that error ?
?
Thanks!