adamriley Posted May 8, 2010 Share Posted May 8, 2010 Any help error ------------------------------------------------------------------------------------------------- "Parse error: syntax error, unexpected '{' in C:\xampp\htdocs\Counter\demo.php on line 23" ------------------------------------------------------------------------------------------------- <?php if ($visitors_online == '1'){ /* CLOSE PHP HERE BECAUSE WE WANT TO OUTPUT HTML */ ?> <html> <body> <h2>this would be 2 minute wait time</h2> <?php } else $visitors_online == '0'{ /* OPEN PHP FOR THE if THEN CLOSE IT FOR HTML AGAIN */ ?> <html> <body> <h2>This spot is free</h2> <?php } // OPEN PHP AGAIN FOR THE CLOSING BRACE?> Link to comment https://forums.phpfreaks.com/topic/201114-help-for-a-script/ Share on other sites More sharing options...
Pikachu2000 Posted May 8, 2010 Share Posted May 8, 2010 The elseif() has no parentheses. EDIT: It isn't even an elseif(), but it should be. Either that or simply an else {}, depending on what the rest of the code does. Link to comment https://forums.phpfreaks.com/topic/201114-help-for-a-script/#findComment-1055116 Share on other sites More sharing options...
adamriley Posted May 8, 2010 Author Share Posted May 8, 2010 ok thanks for the reply and it now works Link to comment https://forums.phpfreaks.com/topic/201114-help-for-a-script/#findComment-1055118 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.