RE: [PHP-DB] Re: Dynamically populating a dropdown box
| From: | Andrew Chase | Date: | Fri, 14 Dec 2001 17:41:36 +0000 |
| Subject: | RE: [PHP-DB] Re: Dynamically populating a dropdown box | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-15033@lists.php.net to get a copy of this message | ||
> I also prefer to use printf("<option value=\"%s\"> so it has the value in
> quotes - just a fussy html thing i do though.
If you like your code to be legible in a browser's 'View Source' function
(which can sometimes be helpful for debugging), you can also add a newline
"\n" character to the end of each option line so you get
<option value="foo">foo</option>
<option value="bar">bar</option>
<option value="bat">bat</option>
...
instead of
<option value="foo">foo</option><option
value="bar">bar</option><option
value="bat">bat</option>...