Thundarfoot Posted January 23, 2008 Share Posted January 23, 2008 I am a noob: here is my sign ??? This is the code <? $A = "A"; if ($A == "A") { echo "A is set" } else { echo "A is NOT set" } ?> and this is the error msg Parse error: syntax error, unexpected '}', expecting ',' or ';' in D:\xampp\htdocs\LootWhore\SkillCards\a.php on line 6 please explain what I am missing.... and thank you. Quote Link to comment https://forums.phpfreaks.com/topic/87295-solved-very-simple-if-statement-syntax-error/ Share on other sites More sharing options...
interpim Posted January 23, 2008 Share Posted January 23, 2008 your missing a semicolon on both your echo statements. Quote Link to comment https://forums.phpfreaks.com/topic/87295-solved-very-simple-if-statement-syntax-error/#findComment-446519 Share on other sites More sharing options...
p2grace Posted January 23, 2008 Share Posted January 23, 2008 Yeup, it should look like this: <? $A = "A"; if ($A == "A") { echo "A is set"; } else { echo "A is NOT set"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/87295-solved-very-simple-if-statement-syntax-error/#findComment-446612 Share on other sites More sharing options...
Thundarfoot Posted January 23, 2008 Author Share Posted January 23, 2008 thanks Quote Link to comment https://forums.phpfreaks.com/topic/87295-solved-very-simple-if-statement-syntax-error/#findComment-446614 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.