Created an array that needs randomizing however the array_rand is not working. Is my syntax wrong somewhere? I don’t notice anything wrong. Plus, array_rand is used elsewhere on the code so I know it’s possible to use it.
$array_11 = array (
"40","20","36",
);
$random_width_1 = array_rand($array_11, 3);
echo $array_11[$random_width_1[0]];
echo $array_11[$random_width_1[1]];
echo $array_11[$random_width_1[2]];
Try to use try http://php.net/shuffle instead of array_rand