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