take average of array php code example Example: php get array average $myArray=[1,5,4,3]; $average = array_sum($myArray)/count($myArray);