I get an error at line number X when I run my PHP script, but I don't see any problem on that line.
The line number in a PHP parse error message is the line where PHP "got too confused and gave up," but it's not necessarily the line where the root cause of the problem occured. When you get such a message start looking at that line, then start working your way back through the code for various syntax errors (missing ";", unbalanced brackets or quotes, etc.) It is worth using an editor with PHP syntax color-coding to help you see some of these errors.