|
Posted by Jeremy on 09/28/07 19:18
Shelly wrote:
>
> Also, don't use
> short tags. ALWAYS use <?php and not <?.
>
Why? There is no compelling reason not to use short tags, unless you
love typing.
Also, per your other comment, a closing ?> includes an implicit
semicolon. Whether or not to omit the semicolon in a simple echo
statement: <?=$var?> is purely stylistic (I prefer to leave it out in
such a scenario).
People love to bash short tags, but using <?php echo $blah; ?> every
time you want to output a variable in a template makes for unwieldy
template code. PHP has a shorter, more expressive, and semantically
equal method of achieving the same; why not use it?
Navigation:
[Reply to this message]
|