Re: [SMARTY] Section problem
| From: | messju mohr | Date: | Thu, 20 Feb 2003 14:03:07 +0000 |
| Subject: | Re: [SMARTY] Section problem | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7993@lists.php.net to get a copy of this message | ||
On Thu, Feb 20, 2003 at 02:52:35PM +0100, Tom Sommer wrote:
> hey everyone,
>
> I have this newbie problem with section
> I've got this:
>
> {section name=menu loop=$menu}
> menu = {$menu[menu]}
> {/section}
>
> $menu looks like this:
> array(
> "News" => "index.php",
> "About" => "about.php",
> "Articles" => "articles.php",
> "Desktops" => "desktop.php",
> "Forums" => "forums.php",
> "Links" => "links.php",
> "Contact" => "contact.php"
> );
{foreach from=$menu key=name item=href}
menu = <a href="{$href}">{$name}</a><br>
{/foreach}
OTOH for sections the array has to hav numeric keys.
> How do I loop those with section?
> In the documentation it does not state how the array should look for section
> to work...
>
> thanks