Re: [SMARTY] Appending and prepending on a section?

From: Date: Wed, 31 Jul 2002 13:22:16 +0000
Subject: Re: [SMARTY] Appending and prepending on a section?
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5534@lists.php.net to get a copy of this message
{section} is works for multiple variables, where foreach works for one. Just like the difference between for() and foreach() in PHP. Hendy Irawan wrote:
smarty-general,
{section name=somesection loop=$variable} {if $smarty.section.somesection.first}<ul>{/if} <li>{$variable[somesection].name}</li> {if $smarty.section.somesection.last}</ul>{/if} {sectionelse}
    There were no names!
{/section}
Is there a similar way to do this on {foreach} ?? I wonder why people like to use section. It messes up associative arrays. I prefer to use foreach no matter it's associative or simply indexed. Salam hangat, Hendy Irawan - www.GaulDong.NET Kantor: (021) 5260467 [SoftVation] Kos: (021) 5261839 [kamar 3]
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

« previous php.smarty.general (#5534) next »