Skip to content

Kirby 4.5.0

A::keyBy()

Takes an array and makes it associative by an argument.

A::keyBy(array $array, callable|string $keyBy): array

Parameters

Name Type Default
$array * array
$keyBy * callable|string

Return type

array

Parent class

Kirby\Toolkit\A