View Full Version : Parse error: syntax error, unexpected $end

02-01-2007, 05:13 PM

I'm only a beginner on PHP but keep getting the message in the title as an error when I upload the page.

The line number it applies to is always on the last line, even if that line is blank.

Anyone know why and how to fix?

Thanks, Flic

02-01-2007, 05:18 PM
How the heck can we possibly know how to fix it if you haven't posted any code or what the error message was?

02-01-2007, 06:48 PM
I did post the error, its in the title!

02-01-2007, 07:01 PM
I think thats because you havent closed some {} tags

02-01-2007, 07:04 PM
But you haven't posted your code. Not everyone's code is the same you know. Post YOUR code. Stop making us guess.

02-01-2007, 07:04 PM
if you are using any loops then check that they have all been closed


if (this is the statement){
###do somet

as you can see all loops start with a { and end with a }

failing that post your code and this will allow us to find where the problem is.

02-01-2007, 09:44 PM
Ah ha! It was a missing } , apparently when I deleted a chunk I accidentaly deleted that too! I should have thought to look for that but it was the fact is was coming up with the error on the last line that got me, but then now I know what it was I'm guessing it was expecting it later.

The reason I didn't want to post the code unless absolutely necessary was because I have done before and the threads now appear in google when looking for the site. Is there a way to remove threads on here? I couldn't see one.

02-01-2007, 09:55 PM
Why do you want to remove a thread? If you've got a problem and you solve it then you can leave it for others to find when they have the same problem.


02-02-2007, 12:23 AM
Not this one, but other ones where I (stupidly) actually put the whole url in the message so it comes up in google as mentionned. Boss googled it once and wants it off.