Pick one or more random keys out of an array
array_rand ( array $array [, int $num = 1 ] ) : mixed
The input array.
Specifies how many entries should be picked.
When picking only one entry, array_rand() returns the key for a random entry. Otherwise, an array of keys for the random entries is returned. This is done so that random keys can be picked from the array as well as random values. Trying to pick more elements than there are in the array will result in an E_WARNING level error, and NULL will be returned.
 => 0
 => 1