Multiple Select Stuff
| From: | John Coggeshall | Date: | Fri, 04 Aug 2000 22:33:57 +0000 |
| Subject: | Multiple Select Stuff | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10277@lists.php.net to get a copy of this message | ||
Okay, Say you having something like...
<SELECT NAME="myselect[]" MULTIPLE>
<OPTION VALUE="abc">ABC</OPTION>
<OPTION VALUE="def">DEF</OPTION>
<OPTION VALUE="ghi">GHI</OPTION>
</SELECT>
when you post it to the script, you'll get an array like....
$myselect = array(0=>"abc",
1=>"def",
2=>"ghi");
Is there *any* way to change the array indexing? I.E.
$myselect = array("ABC"=>"abc",
"DEF"=>"def",
"GHI"=>"ghi");
My problem is I'd like PHP to select certain options in the list that the
user selected perviously. Does that make sense?
Any suggestions?
John