Click to See Complete Forum and Search --> : unexpected t_variable


gopher292
06-13-2005, 09:51 PM
Hello,

I'm getting an error message when I execute a php script:

Parse error: syntax error, unexpected T_VARIABLE in C:\Documents and Settings\All Users\Documents\seo\tools\linkquality.php on line 12

Line 12 reads:


$page = "http://rankwhere.com/google-page-rank.php?url=www." . $target;

The contents of $target are:

grandcountyweddings.com/Default.aspx?tabid=67

What is causing the error message?

Thank you.

NogDog
06-13-2005, 09:56 PM
Most likely a missing semi-colon at the end of the preceding command (or possibly a missing closing quote, parenthese, etc). Note that the line number in the error message just tells you where the parser got confused and gave up, it doesn't necessarily mean that's the line with the error.

gopher292
06-13-2005, 10:00 PM
It was a missing semi-colon on the previous line.

Thanks for the tip about the line number, I'll keep it in mind.

Thank you! :)

NogDog
06-13-2005, 10:12 PM
You're welcome.

You'll find that no matter how long you work with PHP, you'll still be leaving out a semi-colon here or there (and smacking your forehead when you find out that's why your code isn't working). :)