for example
some html....
<p class="date"><?php echo $date; ?></p>
more html...
for example
some html....
<p class="date"><?php echo $date; ?></p>
more html...
It might be better to always use a semi-colon :
As you do use long tags it doesn't really matter. Personally I do use short tags in my templates and it goes to be extremely handy without semicolon, just <?=$var?>, <? endif ?> and such.
But in the long sheets of code I always use semicolons.
I find that not doing so can:
So yes, I recommend doing so, unless you are sure short tags are fine for the server config in which case its not really relevant.
When editing other people's stuff, I try to just follow the same style.
This particular little idiosyncrasy is discussed in the instruction separation manual page.
The bottom line is that it's not enforced either way, so it's left up to the programmer. It's a decent item to touch on in any sort of PHP coding standard, but as far as standards go, it's a relatively minor issue.
Personally, I have started always using a trailing semi-colon. It's easier on your IDE, and helps avoid those quick little parse errors when you jump into a template and start appending code (especially in a verbose template, that might not have user-friendly line wrapping).
I'd recommend it, if for no other reason than it's a good habit to get into, like properly indenting html.