loop howto
| From: | Roger Thomas | Date: | Thu, 04 Jul 2002 08:55:21 +0000 |
| Subject: | loop howto | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-5194@lists.php.net to get a copy of this message | ||
i would like to do a simple loop that output these lines N number of times
based on the template variable $N. the html-form variable, var, should also
changed accordingly, ie var1,var2,var3,etc etc. i do not know if i shoud use
section or foreach. problem is i just do not know how to. please advise as i am
only 2 hours old with Smarty :(
tpl file:
<html>
{assign var=numloop value=$N}
...
...
<TD>
<input type="text" name="var{$what_i_should_put_here?}">
</TD>
...
...
</html>
rgds.
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com