PHP isn’t really my language of choice, that being said I remember seeing a php if being used something like this:
<?php
if (blah) {
?>
// loads of html and js that doesn't need to be escaped since we closed
// the php already with "?>"
<?php
}
?>
Or something like this. I don’t know what it’s called and googling php if doesn’t help.
What’s this technique called and what’s the correct syntax for it?
It can be used as you posted in the question, or like this (which I prefer):
This is most often seen on templates where you don’t do any logic, just simple
ifandloopslike: