Re: multiselects and arrays
| From: | elias | Date: | Fri, 11 May 2001 17:22:17 +0000 |
| Subject: | Re: multiselects and arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52412@lists.php.net to get a copy of this message | ||
Here if you want, you can access the names with '[]' as:
_sel1 = eval("document.myform.SEL1[]");
_sel1.itemIndex
..
.
.
.
-elias
""Max Vysotskiy"" <Maxim_Vysotskiy@ep.minsk.by> wrote in message
news:9deame$cj3$1@toye.p.sourceforge.net...
> Hi.
> Why doesn't PHP convert mutiselect values with plain names (not
array-like)
> to arrays. Is there any reason to not doing this?
>
> Example:
> I have a page with multiselect, which name is SEL1
> (I cannot use square brackets because I need to use a JavaScript on the
> page, so, it's not allowed in variable names to contain [ ] ). When
browser
> submits this page, and if there are sew values selected in this
multiselect,
> it just sends this values along to each other with same name.
> (such as in case of GET method:
http://somehost.com/index.php?SEL1=1&SEL2=2)
> So, why not parse this, and in case if there are more than one variable
with
> same name, convert this variable to array, and put all the values there?
> Thanx
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>