Error message...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
joetheeskimo5
Forum Commoner
Posts: 43
Joined: Sun Dec 14, 2003 4:47 pm
Location: US
Contact:

Error message...

Post by joetheeskimo5 »

I have pretty much no knowledge with errors in my PHP code, so for one, could someone please reccomend a site that has a clean list of error messages and how to troubleshoot them? Secondly, could someone help me with this parse error I just got?

Parse error: parse error, unexpected T_IF in c:\program files\apache group\apache\htdocs\viewcomics.php on line 15

Line 15 of my code seems to be fine (this is from a script to view comics as a slideshow):

Code: Select all

If (($comicshowing == "http://www.wormwars.com/comic/1-1.jpg") || ($comicshowing == "http://www.wormwars.com/comic/1-2.jpg")) {
Please help!

Thanks,
Joe
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

unexpected T_IF is basically saying the 'if' was unexpected which suggests the problem is on the line before the one you posted. Make sure the previous line has a ; on the end.

Not sure where there's a 'nice' list of the errors.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the error is prior to that line.
joetheeskimo5
Forum Commoner
Posts: 43
Joined: Sun Dec 14, 2003 4:47 pm
Location: US
Contact:

Post by joetheeskimo5 »

Haha, thanks! You were right, it was a missing a semicolon on the previous line! Thanks for helping out a clueless moron. ;)

Joe
Post Reply