More of a stylistic question really, but how do you mix HTML tabs with scripting logic tabs in your source code? That might not be the best way to state the question, but I think a simple example will demonstrate it well. Note the tabbing:
<table>
<tr><td>This is the first row</td></tr>
<? if ($test == true) { ?>
<tr><td>Only display the second row if some test is true</td></tr>
<? } ?>
</table>
vs
<table>
<tr><td>This is the first row</td></tr>
<? if ($test == true) { ?>
<tr><td>Only display the second row if some test is true</td></tr>
<? } ?>
</table>
I know in PHP you can be crafty with the if syntax and do "if(something):" and then do an "endif;" later. But it amounts to the same thing.
Should your code tab based on the HTML or based on the logic conditions. I ask this because I am working on a project (not in PHP, but similar scripting language) where there is no MVC, so there are loads of logic mixed in with the HTML and it can get quite messy in terms of the tabs. If you tab based on both your code ends up too far from the left-margin. Are there any standards to follow here?