0

I have been scripting PHP for for about 9 months now and im starting to run into a problem with my if conditions. This has never happened before.

if ($reason != "9ee1e1f4fbf1"){
    XXXXXXXXX
}

I even tried putting the 9ee1ef4fbf1 in parenthesis and that didnt work. i keep getting this:

Parse error: syntax error, unexpected T_IF in /home/content/49/549/html/index.php on line 21
DonJuma
  • 2,028
  • 13
  • 42
  • 70
  • 1
    The problem is more likely to be in the lines immediately prior to your if statement, perhaps a missing ; on the previous line. Please post a line or two before as well. – Mark Baker Nov 17 '10 at 23:41
  • Can you give us the code (or pseudo-code as accurate as possible [change variable names if they are sensitive]) above this statement? – Caladain Nov 17 '10 at 23:41

4 Answers4

4

The problem is in the line above the if. Maybe forgot a semicolon?

AndreKR
  • 32,613
  • 18
  • 106
  • 168
1

Please post the lines before the if statement. Usually, when you get an unexpected ____ error in PHP, it means you left out a semi-colon or something like that.

Jesse Bunch
  • 6,651
  • 4
  • 36
  • 59
1

The T_IF token is unexpected, probably because PHP was in a parsing state that wasn't finished by an ending delimiter (perhaps the end of line semi-colon (;)).

alex
  • 479,566
  • 201
  • 878
  • 984
0

You should look at anything before the if, maybe you are missing a semicolon(;).

Jose Vega
  • 10,128
  • 7
  • 40
  • 57