Skip to content

Kirby 4.3.0

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