The array_rand Function in PHP

Published: 07 June 2011
on channel: life michael
1,662
3

Using the array_rand(array $input [, int $num_req ] ) function we can get randomized selected elements from our array. The first parameter is our array. The second parameter is the number of elements we request. If we request one element only, array_rand() returns the key for the random element. If we request more than one element, array_rand() returns an array of keys for the random elements.


On this page of the site you can watch the video online The array_rand Function in PHP with a duration of hours minute second in good quality, which was uploaded by the user life michael 07 June 2011, share the link with friends and acquaintances, this video has already been watched 1,662 times on youtube and it was liked by 3 viewers. Enjoy your viewing!