Method: a::shuffle
Shuffles an array and keeps the keys
Info
Syntax
a::shuffle($array)
Parameters
- $array (array) The source array
Return (array)
The shuffled result array
Example
$array = array(
'cat' => 'miao',
'dog' => 'wuff',
'bird' => 'tweet'
);
$shuffled = a::shuffle($array);
// output: array(
// 'dog' => 'wuff',
// 'cat' => 'miao',
// 'bird' => 'tweet'
// );