shuffle(3) php man page | unix.com

Man Page: shuffle

Operating Environment: php

Section: 3

SHUFFLE(3)								 1								SHUFFLE(3)

shuffle - Shuffle an array

SYNOPSIS
bool shuffle (array &$array)
DESCRIPTION
This function shuffles (randomizes the order of the elements in) an array.
PARAMETERS
o $array - The array.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1 shuffle(3) example <?php $numbers = range(1, 20); shuffle($numbers); foreach ($numbers as $number) { echo "$number "; } ?>
NOTES
Note This function assigns new keys to the elements in $array. It will remove any existing keys that may have been assigned, rather than just reordering the keys.
SEE ALSO
array_rand(3), The comparison of array sorting functions. PHP Documentation Group SHUFFLE(3)
Related Man Pages
arsort(3) - php
array_keys(3) - php
array_key_exists(3) - php
array_reverse(3) - php
array_rand(3) - php
Similar Topics in the Unix Linux Community
Data Shuffler 0.1 (Default branch)
Don't Lose Your New Shuffle!
How to shuffle odd and even columns?
Randomized shuffle words on each line
For loop and read from different directories