Wednesday, January 19, 2011

PHP: Smarty: {foreach} doesn?t render my array

On one of the websites I work I couldn’t render an array in a smarty template. My code looked like this:

{foreach from=$myarray key=mykey item=items}

<h2>{$mykey}</h2>

{foreach from=$items item=it}

{$it.value}

{/foreach}

{/foreach}

I used print_r in my controller to show content of $myarray and it was just fine. After a while I found the error: Zend Framework did not allow me
to work [...]

computer network GOOGLE Source: GOOGLE computer network FORMFACTOR Enterprises IT FISERV

Source: http://de77.com/php/php-smarty-foreach-doesnt-render-my-array

No comments:

Post a Comment