Prev Question
Next Question

Which of the following expressions will evaluate to a random value from an array below?
$array = array(“Sue”,”Mary”,”John”,”Anna”);

A.
array_rand($array);

B.
array_rand($array, 1);

C.
shuffle($array);

D.
$array[array_rand($array)];

E.
array_values($array, ARRAY_RANDOM);

Prev Question
Next Question

Leave a Reply

Your email address will not be published. Required fields are marked *