$sum = 0;for($i=0;$i $sum += $a[$i];}var_dump($sum);$sum = 0;foreach($a as $key=>$value){ $sum +=$value;}var_dump($sum);
$c=0;for($i=0;$i $c +=$a[$i]; }echo $c;$c=0;foreach($a as $v){ $c +=$v;}echo $c;