tags:

views:

95

answers:

5

I am getting the following error in one of my php file Parse error: syntax error, unexpected $end in /home/qualitet/public_html/game/create.php on line 1

What could be the problem? I checked all the if else.

+1  A: 

The parser encountered an unexpected end of your source code. So you’re probably missing some closing curly bracket or something similar.

Gumbo
+1  A: 

I checked all the if else.

I don't think you did :) Try commenting out all of them, and bringing them back one at a time.

chelmertz
A: 

You've probably missed a closing bracket (}) somewhere.

Tomas Markauskas
+1  A: 

Check if all your curly braces are closed. It can also be caused by short open tags

Mark Basmayor
A: 

I use a binary search to find this.

Save your file to a new file and then remove large chunks (1/2) at a time, until the code compiles. That last chunk removed is the one with the missing }

Daniel