Skip to content

Kirby 4.4.1

A::average()

Returns the average value of an array

A::average(array $array, int $decimals = 0): float|null

Parameters

Name Type Default Description
$array * array The source array
$decimals int 0 The number of decimals to return

Return type

float|null

Parent class

Kirby\Toolkit\A