Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Calculate the sum of values in an array

Tue Oct 28, 2008 1:22 am

Code:

<?php
   $grades
= array(42,"hello",42);
   
$total = array_sum($grades);
   print
$total;
?>




Post a reply
  Related Posts  to : Calculate the sum of values in an array
 Return all the values of an array using array_values     -  
 calculate speed of a car in javaCV     -  
 Calculate euclidean distances     -  
 Calculate score of the student     -  
 How to Calculate Volume of a Rectangle     -  
 Calculate process time     -  
 calculate sum of many text inputs in javascript     -  
 calculate the total type of stocks     -  
 Calculate the area of a circle of given radius     -  
 calculate the load time for a page     -  

Topic Tags

PHP Arrays