Reply to Re: newbie question: <?=$variable?> yields no output

Your name:

Reply:


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?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация