selected item in select element?
| From: | Charles Ross | Date: | Mon, 19 Dec 2005 23:34:05 +0000 |
| Subject: | selected item in select element? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-22318@lists.php.net to get a copy of this message | ||
How can I specify which item of a select element is selected? I have a line:
$form->addElement('select', 'State', 'State:', $STATES);
99% of the time, I know what state the user will fill in, and I want that one to be selected, but I want the states to appear alphabetically in the menu.
Thanks
Chuck Ross