Skip to content

Kirby 4.2.0

A::random()

Returns a number of random elements from an array, either in original or shuffled order

A::random(array $array, int $count = 1, bool $shuffle = false): array

Parameters

Name Type Default
$array * array
$count int 1
$shuffle bool false

Return type

array

Parent class

Kirby\Toolkit\A