<html>
<head><title>Looping through an array</title></head>
<body>
<?php
$myarray[0] = 45;
$myarray[1] = 64;
$myarray[2] = 55;
$total = 0;
for ($i=0; $i<3; $i++) {
$total += $myarray[$i];
}
echo ("Average Mark: " . ($total/3));
?>
</body>
</html>