Sorry I wasn't clear. The 4 rows being echoed subject 1, subject 2, 3 and 4 are all integers. I want to add these 4 rows together and echo out the total of the 4 fields combined. the full code is here.
<?php
$con = mysql_connect("localhost","","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("mainbase", $con);
$result = mysql_query("SELECT * FROM agegame");
echo "<table border='1'>
<tr>
<th>subject1</th>
<th>subject2</th>
<th>subject3</th>
<th>subject4</th>
<th>email</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['subject1'] . "</td>";
echo "<td>" . $row['subject2'] . "</td>";
echo "<td>" . $row['subject3'] . "</td>";
echo "<td>" . $row['subject4'] . "</td>";
echo "<td>" . $row['email'] . "</td>";
echo "</tr>";
}
echo "</table>";
?>