array_rand in PHP

Syntax of array_rand mixed array_rand(array array[, int count]) Picks a random element from the given array. The second (optional) parameter can be given to specify a number of elements to pick and return. If more than one element is returned, an array of keys is returned, rather than the element’s value. Example of array_rand