Re: [SMARTY] a simple loop
| From: | Monte Ohrt | Date: | Wed, 08 May 2002 17:57:53 +0000 |
| Subject: | Re: [SMARTY] a simple loop | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4085@lists.php.net to get a copy of this message | ||
{section name=foo loop=10}
loop index is {$smarty.section.foo.index}
{/section}
Or to loop through an array:
{section name=foo loop=$myvar}
loop index is {$smarty.section.foo.index}
array index value is {$myvar[foo]}
{/section}
Stefan Sturm wrote:
Hello list, I'looking for a simple loop, like: for($a=0, $a <= 10, $a++) { echo $a; do_something_with($a); } How can I do this in smarty??? Thanks and greetings, Stefan Sturm-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.