How to get random value out of an array?
PHP provides a function just for that: array_rand()
http://php.net/manual/en/function.array-rand.php
$ran = array(1,2,3,4);$randomElement = $ran[array_rand($ran, 1)];
PHP provides a function just for that: array_rand()
http://php.net/manual/en/function.array-rand.php
$ran = array(1,2,3,4);$randomElement = $ran[array_rand($ran, 1)];