The table should be at the top but instead the table is below the do statement. Shouldn't the program start from the top and work it's way down?
OUTPUT: (basically the TABLE is in the wrong place)
http://testingrentals.hostei.com/test.php
CODE BELOW:
<html>
<body>
<?php
echo "<table border='0' cellpadding='3'>";
echo "<tr>";
echo "<td bgcolor='#CCCCCC' align='center'>Distance</td>";
echo "<td bgcolor='#CCCCCC' align='center'>Cost</td>";
echo "</tr>";
$distance = 50;
while ($distance <= 250)
{
echo "<tr>\n <td align='right'>$distance</td>\n";
echo " <td align = 'right'>".$distance / 10 ."</td>\n</tr>\n";
$distance += 50;
}
echo "</tables>";
echo '<p>';
$num = 100;
do
{
echo $num.'<br>';
$num += 50;
}
while ($num<350);
?>
</body>
</html>