PHP array_sum() functionThe array_sum( ) function is an inbuilt function of PHP. The array_sum( ) function calculates the sum of values in an array and returns the sum of values in an array as an integer or float. This function was introduced in PHP 4.0.4. SyntaxParameters
ReturnThe array_sum( ) function returns the sum of values. Example 1Output: 130 Example 2Output: 0 Example 3Output: 39.7 Example 4Output: 122.12
Next TopicPHP Array Functions
|