Zend_View Hack for implementation of RSS Feed

Using Zend_View for your site and want to implement an RSS Feed? You might run into the problem that the XML header definition is interpreted as PHP code:

<?xml version="1.0" encoding="ISO-8859-1"?>

Before you start cursing the world try this (rather obvious) workaround:

<?php echo '<?xml version="1.0" encoding="ISO-8859-1"?>'; ?>
More about: ZendFramework

Sign up for my newsletter to get notified when I post new content on this blog and with the occasional exclusive content only for subscribers.

By clicking on the Subscribe button I am giving my consent for Benjamin Eberlei to hold my name and email address for the purposes of contacting me with a newsletter on the topics of this blog. You can unsubscribe with one click at any time and withdraw your consent. No spam. I will never share your e-mail address. Privacy Policy