A::shuffle()
Shuffles an array and keeps the keys
A::shuffle(array $array): array
Parameters
Name | Type | Default | Description |
---|---|---|---|
$arrayrequired | array |
no default value | The source array |
Return type
array
The shuffled result array
Parent class
Examples
$array = [
'cat' => 'miao',
'dog' => 'wuff',
'bird' => 'tweet'
];