PHP array_sum() Function
Complete PHP Array Reference
Definition and Usage
The array_sum() function returns the sum of all the values in the array.
Syntax
Parameter |
Description |
array |
Required. Specifies an array |
Example
<?php
$a=array(0=>"5",1=>"15",2=>"25");
echo array_sum($a);
?>
|
The output of the code above will be:
Complete PHP Array Reference
Learn XML with <oXygen/> XML Editor - Free Trial!
|
|
oXygen helps you learn to define,
edit, validate and transform XML documents. Supported technologies include XML Schema,
DTD, Relax NG, XSLT, XPath, XQuery, CSS.
Understand in no time how XSLT and XQuery work by using the intuitive oXygen debugger!
Do you have any XML related questions? Get free answers from the oXygen
XML forum
and from the video
demonstrations.
Download a FREE 30-day trial today!
|
|