Skip to content

Kirby 4.4.1

A::get()

Gets an element of an array by key

A::get(mixed $array, array|string|int|null $key, mixed $default = null)

Parameters

Name Type Default Description
$array * mixed The source array
$key * array|string|int|null The key to look for
$default mixed null Optional default value, which
should be returned if no element
has been found

Parent class

Kirby\Toolkit\A