Reference

Guide

A::average()

Returns the average value of an array

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

Parameters

Name Type Default Description
$array array

The source array

$decimals int 0

The number of decimals to return

Return type

float

Source code

kirby/src/Toolkit/A.php#L501