array_sum : array_sum « Data Structure « PHP






array_sum

 
<?php

    $grades = array(42,"hello",42);
    $total = array_sum($grades);
    print $total;

?>
  
  








Related examples in the same category

1.Finding the Sum and Average of the Values in an Array