array_sum in PHP

Syntax of array_sum number array_sum(array array) Returns the sum of every element in the array. If all of the values are integers, an integer is returned. If any of the values are floats, a float is returned Example sum(a) = 20 sum(b) = 6.9