PHP Parse error: parse error unexpected $ in main.php on line 12
I am trying to make my project and i get don't understand why am i getting this error. The error says PHP Parse error: parse error unexpected $ in main.php on line 12. What does this error means? How do i correct the problem, Please help, I'm still a noob, hope i get some help... Thanks in advance... :rolleyes:
Re: PHP Parse error: parse error unexpected $ in main.php on line 12
The error you are receiving says that it detected "$" on the 12th line of main.php file where it should not be there. This can be due to typo error. Just have a look at the coding of main.php file and see it there is this dollar sign without it being used or it used where it is not necessary. For more help, go through the php help file regarding syntax of various php commands and instructions... :thumbup1:
Re: PHP Parse error: parse error unexpected $ in main.php on line 12
Which php version are you using, is it the older version or its PHP 5? Also check for this symbols in your file : "<?" If you have used it, try to change it to "<?php". Also open the php.in file and try to enable "register globals". See what you get. If you get any errors, do post back, if not then you got your problem solved. All the best! :thumbup1:
Re: PHP Parse error: parse error unexpected $ in main.php on line 12
Thanks a lot guys, for replying to my post, Well i will try out the thing both of you said as soon as i get home. Also i have just removed the older PHP version and installed PHP 5. I hope this works out, if it doesn't i will post back. Thanks again... :notworthy :biggrin: