Jump to content

Newbie Question: Parse error: syntax error, unexpected T_LNUMBER


suttercain

Recommended Posts

Hi everyone,

 

I am new(er) to PHP but I am trying to learn. I obtained about 10 books on the subject and am in Chapter 5 of the first one.

 

I copied this script from the book

 

<?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>";
?>

 

When I tried it out I got the following error:

Parse error: syntax error, unexpected T_LNUMBER in /home/superman/public_html/test.php on line 7

 

I looked in the book to make sure I copied the code correctly and I did. Can someone point me to the error? I am here to learn so let me have it.

 

Also... Can anyone recommend any really good PHP books for beginners that are easy to understand?

 

Thank you in advance.

 

Shannon

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.