Reply to Re: php delimiters

Your name:

Reply:


Posted by David Haynes on 11/19/45 11:45

Garry Jones wrote:
> Excuse the newbie question.
>
> I have seen different types of delimiters to note php code.
>
> <?php and ?>
> and
> <? and ?>
>
> However the code
> <?= and ?>
> is marked up by Dreamweaver as php delimiters. (ie not part of the code
> itself). I have noticed that the = is necessary sometimes but would like an
> explanation about its use.
>
> Whats the difference between these codes? Are there any limitations on
> browser versions, platforms, or other user settings that favour either pair
> of delimiters.
>
> Garry Jones
> Sweden
>
>
>

This was discussed quite recently so rewind your news for the details,
but in summary:

<?php and <? are equivalend if and only if short_open_tag is set to 'on'
in the php.ini file.

Similarly, <?php echo and <?= are equivalent with the same restriction.

Use of the short tags can cause problems with XML parsers, application
portability and the future direction of PHP, so get used to using the
long forms. i.e. use <?php and <?php echo.

-david-

[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

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