|
Posted by Robert Amos on 05/03/05 12:52
On 4/29/05, Maximillian Schwanekamp <lists@neptunewebworks.com> wrote:
> Abdul-Wahid Paterson wrote:
> For complex array structures I find it easier to read/write the template
> markup by using assign() here, especially if you're going to use
> multiple values from the array:
>
> <ul>
> {section name=news value=$result.ITEMS}
> {assign value=$result.ITEMS[news] var="item"}
> <li>
> <h3><a href="{$item.LINK}">{$item.TITLE}</a></h3>
> <p>{$item.DESCRIPTION}</p>
> </li>
> {/section}
> </ul>
Which is exactly what {foreach} does automatically, only with PHP5 and
newer, its alot more efficient..
-bok
--
Xnyo - http://xnyo.odynia.org/
Navigation:
[Reply to this message]
|