confused over parse error message
Posted: Sun Jun 16, 2002 4:00 am
I'm using edit plus for php at the moment and I keep getting this message
Parse error: parse error in C:\apache\htdocs\php_practice\table_test.php on line 12 (echo "<tr>\n";)
with the following script:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> table test</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
</HEAD>
<BODY>
<?php
echo "<table border=\"1\" bordercolor=#FFFF00 align=center>\"n;
for($i=1; $i<=6; $i++)
{
echo "<tr>\n";
for($j=0; $j<=3; $i++)
{
echo "\t<td>";
echo ($i * $j);
echo "</td>\n";
}
echo "</tr>\n";
}
echo "</table>";
?>
</BODY>
</HTML>
I've wriiten another one similar to the above one which works fine with no error message and has the exact coding it has the same code for line 12. So why the error for line 12 (echo "<tr>\n";)
the other script:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Nested Table Loops</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
</HEAD>
<BODY bgcolor=#0033FF>
<BR><BR><BR><BR>
<?php
echo "<table border=\"1\"bordercolor=#FFFF00 align=center cellspacing=3>\n";
for($y=1; $y<=18; $y++)
{
echo "<tr>\n";
for($x=1; $x<=18; $x++)
{
echo "\t<td bgcolor=#FFFF99 align=center>";
echo ($x * $y);
echo "</td>\n";
}
echo "</tr>\n";
}
echo "</table>";
?>
</BODY>
</HTML>
Parse error: parse error in C:\apache\htdocs\php_practice\table_test.php on line 12 (echo "<tr>\n";)
with the following script:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> table test</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
</HEAD>
<BODY>
<?php
echo "<table border=\"1\" bordercolor=#FFFF00 align=center>\"n;
for($i=1; $i<=6; $i++)
{
echo "<tr>\n";
for($j=0; $j<=3; $i++)
{
echo "\t<td>";
echo ($i * $j);
echo "</td>\n";
}
echo "</tr>\n";
}
echo "</table>";
?>
</BODY>
</HTML>
I've wriiten another one similar to the above one which works fine with no error message and has the exact coding it has the same code for line 12. So why the error for line 12 (echo "<tr>\n";)
the other script:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Nested Table Loops</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
</HEAD>
<BODY bgcolor=#0033FF>
<BR><BR><BR><BR>
<?php
echo "<table border=\"1\"bordercolor=#FFFF00 align=center cellspacing=3>\n";
for($y=1; $y<=18; $y++)
{
echo "<tr>\n";
for($x=1; $x<=18; $x++)
{
echo "\t<td bgcolor=#FFFF99 align=center>";
echo ($x * $y);
echo "</td>\n";
}
echo "</tr>\n";
}
echo "</table>";
?>
</BODY>
</HTML>