Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Parse error: syntax error, unexpected $end

    Hi.

    I'm only a beginner on PHP but keep getting the message in the title as an error when I upload the page.

    The line number it applies to is always on the last line, even if that line is blank.

    Anyone know why and how to fix?

    Thanks, Flic

  2. #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    How the heck can we possibly know how to fix it if you haven't posted any code or what the error message was?

  3. #3
    New Coder
    Join Date
    May 2006
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I did post the error, its in the title!

  4. #4
    Regular Coder
    Join Date
    May 2006
    Location
    Wales
    Posts
    820
    Thanks
    1
    Thanked 82 Times in 79 Posts
    I think thats because you havent closed some {} tags

  5. #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    But you haven't posted your code. Not everyone's code is the same you know. Post YOUR code. Stop making us guess.

  6. #6
    Regular Coder
    Join Date
    Jan 2007
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if you are using any loops then check that they have all been closed

    e.g
    Code:
    if (this is the statement){
    ###do somet
    }
    as you can see all loops start with a { and end with a }

    failing that post your code and this will allow us to find where the problem is.
    Matthew Bagley
    Paramiliar Design Studios
    Website Design | Website Development | Search Engine Optimisation (SEO)

  7. #7
    New Coder
    Join Date
    May 2006
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ah ha! It was a missing } , apparently when I deleted a chunk I accidentaly deleted that too! I should have thought to look for that but it was the fact is was coming up with the error on the last line that got me, but then now I know what it was I'm guessing it was expecting it later.

    The reason I didn't want to post the code unless absolutely necessary was because I have done before and the threads now appear in google when looking for the site. Is there a way to remove threads on here? I couldn't see one.

  8. #8
    Regular Coder
    Join Date
    Oct 2006
    Location
    Bristol
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Why do you want to remove a thread? If you've got a problem and you solve it then you can leave it for others to find when they have the same problem.

    Alex

  9. #9
    New Coder
    Join Date
    May 2006
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Not this one, but other ones where I (stupidly) actually put the whole url in the message so it comes up in google as mentionned. Boss googled it once and wants it off.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •