PHP Programing language

array_sum() Function in PHP
Previous Home Next

array_sum()

The array_sum() function returns the sum of all the values in the array.

Syntax:
array_sum(array)

In above syntax, "array" specifies an array.

Example:

<?php
$arr=array("A"=>97.2,"B"=>1.7,"C"=>9.6);
echo array_sum($arr);
?>

Output:

108.5

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: