Randomize the order of the elements in the array:
The shuffle() function randomizes the order of the elements in the array.
This function assigns new keys for the elements in the array. Existing keys will be removed (See Example 1 below).
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Return Value: | Returns TRUE on success or FALSE on failure |
---|---|
PHP Version: | 4+ |
Changelog: | As of PHP 4.2.0, the random number generator is seeded automatically |
Randomize the order of the elements in the array: