You are here: Re: newbie question: <?=$variable?> yields no output « PHP Programming Language « IT news, forums, messages
Re: newbie question: <?=$variable?> yields no output

Posted by Michael Fesser on 09/28/07 19:48

..oO(Jeremy)

>Why? There is no compelling reason not to use short tags, unless you
>love typing.

Good editors are able to replace '<?=' with the proper longer form
automatically while typing or by pressing a special hotkey.

>People love to bash short tags

Even the PHP guys recommend to _not_ use them.

>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?

Short open tags are unreliable. They can be turned off on the server,
may cause trouble with XML and might be removed entirely in upcoming
versions like all the other old crap (magic quotes, register_globals).
Proper and portable code doesn't rely on them.

Micha

 

Navigation:

[Reply to this 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

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