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.. 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 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 Link to comment https://forums.phpfreaks.com/topic/203758-inline-php/#findComment-1067196 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.