Re: populating a list box problem [message #171117 is a reply to message #171101] |
Sat, 25 December 2010 11:27 |
Peter
Messages: 15 Registered: March 2003
Karma:
|
Junior Member |
|
|
In article <4d14f5a0$0$31600$bed64819(at)gradwell(dot)net>,
denis(dot)m(dot)f(dot)mcmahon(at)googlemail(dot)com says...
> On 24/12/10 19:09, richard wrote:
>> rather than having a god awful long mess of "options" in the code, I would
>> like to populate the listbox by using php.
>
> Something like this maybe
>
> echo "<select name=\"pulldown1\">\n";
> $i = count($options);
> while ($i --) echo "<option value=\"$i\">{$options[$i]}</option>\n";
> echo "</select>\n";
>
> Not really sure what you're describing in the rest of your post though.
>
> Rgds
>
> Denis McMahon
>
Just quickly, I noticed both you and Jerry included \n (newline
character) in your output. Is there a specific reason for adding that?
Would have thought it was completely unnecessary.
--
Pete Ives
Remove All_stRESS before sending me an email
|
|
|