- Code: Select all
<?php
print "<table border=1>\n";
for ($y=1; $y<=12; $y++)
{
print "<tr>\n";
for ($x=1; $x<=12; $x++)
{
print "\t<td>";
print "($x*$y)";
print "</td>\n";
}
print "</tr>\n";
}
print "</table>\n";
?>
This should create a table of 12*12 with numbers inside. The problem is in this line: " print "<table border=1>\n"; "
If I put quotes around the one, then php comes up with an error. Now, why is this? W3C (afaik) says that these kind of things should have quotes around them. Is this a bug in PHP? Or am I doing something wrong?
Machine running OpenBSD, Apache-1.3.26, PHP-4.2.3
Thanks for your help!

