This is also relevant when mixing styles and interspersing PHP with HTML.
The following example gives a syntax error since it associates the else
with the inner if.
<?php
if (condition):
// code
if (another_condition) {
// multi-line code
}
else:
?>
[html
here]
<?php
endif;
?>
A way around this is to
not mix syntax, and change the inner if to the alternate colon-based
syntax.
-jcl-