Results 1 to 4 of 4

Thread: PHP Parse error: parse error unexpected $ in main.php on line 12

  1. #1
    Join Date
    Jul 2009
    Posts
    8

    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...

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    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...

  3. #3
    Join Date
    Jan 2008
    Posts
    1,521

    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!

  4. #4
    Join Date
    Jul 2009
    Posts
    8

    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...

Similar Threads

  1. Replies: 6
    Last Post: 13-08-2010, 10:10 PM
  2. How to add parse in scanner in java?
    By MAGAR in forum Software Development
    Replies: 5
    Last Post: 02-03-2010, 04:30 PM
  3. How to parse XML in J2ME
    By Abigail101 in forum Software Development
    Replies: 5
    Last Post: 19-02-2010, 03:39 AM
  4. How to Parse XML in ASP
    By Dwarner in forum Software Development
    Replies: 4
    Last Post: 24-01-2010, 04:27 AM
  5. PHP WordPress Parse Error: syntax error, unexpected $end in
    By Bisujaksha in forum Software Development
    Replies: 2
    Last Post: 22-05-2009, 09:27 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,056,686.71729 seconds with 16 queries