|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
teddy Smarty n00b
Joined: 22 Jul 2003 Posts: 1
|
Posted: Tue Jul 22, 2003 9:34 am Post subject: nested loop problem |
|
|
I wanna to count the looping number in a nested loop. for example in PHP we can:
$count=1;
(for $i=0;$i<3;$i++)
(for $j=0;$j<4;$j++)
{echo "number is:".$count;$count++;}
//result is showing "number is: 1,2,.........12"
but how i can get the looping number in smarty?
like following code:
{section name=key loop=$a}
{$a[key]}
{section name=key1 loop=$b[key]}
{* some methods to get the cycling number here??*}
{/section}
{/section} |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|