Reply to Re: [SMARTY] Referencing complex associative array

Your name:

Reply:


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/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация