I have not this variable in a script. What is the reason of error? Parse error: syntax error, unexpected $end
A good idea is to first format your code using a php formatter/beautifier, and then open the code within a code editor (such as notepad++), and let the syntax highlighting do the work for you