|
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 |
raoh980 Smarty Rookie
Joined: 13 May 2008 Posts: 7
|
Posted: Wed May 21, 2008 8:16 pm Post subject: html_options 1 to 99 |
|
|
I need to make a <select> with the options that go from 1 to 99.
How can i do this with the html_options function ?
I need to create an array like this
Code: |
$i = array(1=> 1,2,3,4 ... 98, 99);
|
and then
Code: |
<select name="asd" >
{html_options values=$i output=$i}
</select>
|
so that i can use it in the function or what ?
really thank you! |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed May 21, 2008 8:59 pm Post subject: |
|
|
Code: | $smarty->assign('i',range(1,99)); |
will prepare the array.
Your tempalte code will work. |
|
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
|