Hello,
How can I get the average sum of an array? Like $ex = array [2,4,6] The average is 4.
I've tried to look into array functions but couldn't find.
Any ideas? Assaf
Assuming you mean the arithmetic mean, you need to sum all elements and divide with count.
$average= array_sum($ex) / count($ex);