Best practice for lining up PHP syntax in HTML page
You can use other kind of syntax:

...
...
&lt;div id="subcontent"&gt;
    &lt;?php if ($this-&gt;session-&gt;flashdata('message')): ?&gt;
        &lt;div class="blah blah"&gt;
            ...
        ...
        &lt;/div&gt;
    &lt;?php endif; ?&gt;
&lt;/div&gt;


So, &lt;?php ?&gt; can be in 1 line and I think it's beauty:)

Anyway, There are no any 'right' way to do it. You can(and should) choose your own one