Re: Multiple Select Stuff

From: Date: Sun, 06 Aug 2000 01:43:52 +0000
Subject: Re: Multiple Select Stuff
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10290@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? Don't see how that could be done. All elements in a select widget must have the same name. -Rasmus

« previous php.general (#10290) next »