-- Waigani <[EMAIL PROTECTED]> wrote
(on Sunday, 28 September 2008, 12:08 AM -0700):
> Is there a ZF solution to using both short tags and xml declaration in a view
> script? I know <? vs <?xml is a general php problem, but if the ZF manual
> continues to demonstrate with short tags (and I hope it will - long live
> short tags) then it would be good to have a solution for this long standing
> problem with short tags.
> 
> I've come across two solutions (neither ideal): 1. echo out xml declaration,
> 2. patch PHP source code (why is such a patch not standard?).
> 
> Can ZF do anything better?

You could create a helper that echoes it out:
    
    <?= $this->xmlDecl(array('version' => '1.0', 'standalone' => 'true')) ?>

But it's not much different than simply doing this:

    <?= '<?xml version="1.0" standalone="true"?>' ?>

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend Framework           | http://framework.zend.com/

Reply via email to