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. 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. 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"; } ?> 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 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
Archived
This topic is now archived and is closed to further replies.