Re: [SMARTY] FAQ: simple loop

From: Date: Mon, 01 Mar 2004 13:21:09 +0000
Subject: Re: [SMARTY] FAQ: simple loop
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11037@lists.php.net to get a copy of this message
It should be loop=6 because 5 repetitions starting from 0 is index=4 which is right. > On Mon, Mar 01, 2004 at 12:56:17PM +0200, David Förster wrote: >> Hello, >> >> this is what the faq says about doing a simpe for-loop: >> >> === >> {section name="myLoop" start=0 loop=5} >> index={$smarty.section.myLoop.index} >> {/section} >> >> This will output: >> >> index=0 >> index=1 >> index=2 >> index=3 >> index=4 >> index=5 >> === >> >> When I try it, the latest element that is printed is index=4. >> >> Is this an error in the faq or in smarty? > > this error is in the faq then. > >> - david > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php Randum Ian ian@randumian.co.uk CBDagency Web Consultant http://www.cbdagency.com DancePortalGlobal Webmaster http://www.danceportalglobal.com

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