Re: [SMARTY] Sections and foreach

From: Date: Tue, 25 Nov 2003 08:54:32 +0000
Subject: Re: [SMARTY] Sections and foreach
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10597@lists.php.net to get a copy of this message
{section}s are to loop over a block an arbitrary number of times. {foreach} is to loop over arrays. {section} has this magic to use the array's count() as loop-count if passed an array as loop-attribute, but after that it is fully unrelated to the array. On Mon, Nov 24, 2003 at 11:37:30PM +0100, S.P. Telgenhof Oude Koehorst wrote: > Hello, > > Can anyone tell me what the difference is between the use of 'section' and > 'foreach'. It looks to me that both methods do the same job, i.e. looping > through array structures. > > Thanks in advance, > > Sacha Telgenhof > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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