When I'm using PHP and HTML I normally do it this way:
<?php if ($myvar = 'blah') {
echo '<div>some html here</div>';
} else {
echo 'Nothing here';
}
?>
This works but I now have a bunch of html and I need to add a condition and I am trying to avoid having to do this:
<?php if ($myvar = 'blah') {
echo '<div>some html here</div>';
echo '<div>some other html here</div>';
echo '<div>some other html here</div>';
}
?>
Is there a way to wrapper the whole of the html block instead?