The following code shows how to Find Sum of Array Elements in PHP.

<?php
$arr=array(12, 10, 9, 45.778, 621, 3.992, 6.8, -100);
$n=count($arr);
$sum_of_elements=0;
echo 'Array elements ....<br>';
for($i=0;$i<$n;$i++)
{
	echo $arr[$i].'<br>';
	$sum_of_elements+=$arr[$i];
}
echo '<br>Sum of Array elements = '.$sum_of_elements;
?>

Output

Program to Find Sum of Array Elements in PHP
Program to Find Sum of Array Elements in PHP

Further Reading

Examples of Array Functions in PHP

Basic Programs in PHP

Registration Form Using PDO in PHP