Parse error: syntax error, unexpected T_ENDIF

Discussion in 'PHP' started by RogerG, Sep 8, 2011.

  1. #1
    First and foremost, I know little to nothing about web-design, PHP, or anything else involved with the backend of websites.

    My web-developer happens to be on vacation, and without me trying to change any PHP or doing anything else, this problem came up randomly when I try and view the archives:

    Parse error: syntax error, unexpected T_ENDIF in /home/content/42/7987242/html/wp-content/themes/themaskgorilla/archive.php on line 176

    Along with that, the Blog section of my website can not be found as well.

    Any suggestions? Any help would be much appreciated!

    http://TheMaskedGorilla.com
     
    RogerG, Sep 8, 2011 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    See your other post. Basically, you have

    if
    while

    endif
    endwhile

    You can't close the if before you close the while, which is why the endif is unexpected. Swap those two last lines.
     
    Rukbat, Sep 8, 2011 IP