Problem Statement
Which PHP function returns the sum of all elements in an array?
Explanation
The array_sum function adds up all numeric elements of an array and returns the total.
Code Solution
SolutionRead Only
array_sum([2,4,6]); // 12
Practice Sets
This question appears in the following practice sets:
