In my opinion all examples on Zend should use <?php, succint or not.

The issue is portability if you move a project to a client server that doesnt or wont support short tags then you need to change your code, may as well code it properly in the first place.

I truly believe PHP should remove all short cuts, for one it stops queries like this :)

Matthew Weier O'Phinney wrote:
-- Kexiao Liao <[EMAIL PROTECTED]> wrote
(on Tuesday, 07 August 2007, 08:33 AM -0700):
I am new to Zend Framework, what does the tag("<?=") in index.phtml template
file mean? It seems the tag("<?=") is not a php standard tag. Does anyone
can give more detail explaination if this tag? Thanks

Kevin

<? foreach ($this->tables as $tableName): ?>
            <li>
                 "/zfgrid/grid/show/table/<?= $tableName ? ">
                    <?= $tableName ?>
</li>
<? endforeach; ?>

These are PHP short tags, which is an option you can set in your php.ini
or via ini_set(). As somebody else noted:

    <?  : PHP open tag
    <?= : shorthand for <?php echo ...

It's recommended to use the long form of '<?php' for opening tags, as
it's more compatible with the XML and XHTML specifications.  However,
most examples using Zend_View use <? to keep the syntax succinct; I
personally use short tags in my view scripts, in part to set them apart
from normal PHP scripts.

Reply via email to