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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.