array_rand() is the correct PHP function that picks one or more random entries from an array. It returns the key(s) of random value(s), not the values themselves. By default it returns one random key, or you can pass a second parameter to get multiple random keys. The other options are not valid PHP functions.