Set amount of dropdown options, via DB - how?
Posted: Tue May 31, 2011 5:09 am
I want to have a dropdown <option> of between 1 and 100.
In a database, there will be the number set .... such as "35".
Then I want there to be:
Or if it is 50, then it goes only to '50'.
How do I do that? Is it best with a "FOR"? I'm a bit weak when it comes to FOR LOOPS. Any help would be appreciated.
In a database, there will be the number set .... such as "35".
Then I want there to be:
Code: Select all
<select name='list'>
<option value='1'>1<option>
...
<option value='35'>35<option>How do I do that? Is it best with a "FOR"? I'm a bit weak when it comes to FOR LOOPS. Any help would be appreciated.