N-Bomb(Nerd) Posted June 3, 2010 Share Posted June 3, 2010 Hi, I'm trying to code php into my static html page, but I'm having a bit of trouble. I know with "if" statements you're able to do something like: <?php if(true): ?> <p>Hello</p> <?php else: ?> <p>Hi</p> <?php endif; ?> How would I do that for a switch statement though? Also, what is this even called? I tried looking it up without coming up with much.. Quote Link to comment https://forums.phpfreaks.com/topic/203758-inline-php/ Share on other sites More sharing options...
trq Posted June 3, 2010 Share Posted June 3, 2010 http://php.net/manual/en/control-structures.alternative-syntax.php Quote Link to comment https://forums.phpfreaks.com/topic/203758-inline-php/#findComment-1067187 Share on other sites More sharing options...
N-Bomb(Nerd) Posted June 3, 2010 Author Share Posted June 3, 2010 http://php.net/manual/en/control-structures.alternative-syntax.php Thank you much! For anyone else that needs this, I found the workaround here: http://www.php.net/manual/en/control-structures.alternative-syntax.php#80668 Quote Link to comment https://forums.phpfreaks.com/topic/203758-inline-php/#findComment-1067196 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.