i'm attempting to follow an excersize in a book.
The goal is to use php to output a multiplication table.
i have made a few rudamentary scripts so far which all work.
but this one is making no sense to me.
this is my script:
<?php
$start = 1;
$end = 12;
?>
<html>
<head>
<title>multiplication</title>
</head>
<body>
<h2>a multiplication table</h2>
<table border="1">
<?php
print ("<tr>");
print ("<th> </th>");
for ($y = $start, $y <= $end, $y++)
print ("<th>$y</th>");
print ("</tr>");
for ($y = $start, $y<= $end, $y++)
{
print ("<tr><th>$y</th>");
for ($x = $start, $x <= $end, $x++)
{
$result = $y * $x;
print ("<td>$result</td>");
}
print ("</tr>");
}
?>
</table>
</body>
</html>
how ever,
I end up with a blank page in the browser and the source looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
any idea where its getting that info from?