Get a random object from a PHP array

Get a random object from a PHP array


echo $items[array_rand($items)];