adding the values in array

this example shows how to add the values in an array using the array_sum function

<html>
<body>
<?php
$grades = array(45,80,23,100,3);
$total = array_sum($grades);
print $total;
?>
</body>
</html>