Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Colin Viebrock
What I do when I need multidimensional arrays from forms, is name my variables: i.e., I delimit the dimensions with "::". Then, on the page they are posted to, I do: And here is the code for that function, which looks for all the variables that start with 'i::' and creates the multidime

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Rose, Billy
You can iterate through document..elements if you need to access them. Changing the bracket notation would not be needed. "Colin" <[EMAIL PROTECTED]> wrote in message news:<9dec79$aa9$[EMAIL PROTECTED]>... > > Example: > > I have a page with multiselect, which name is SEL1 > > (I cannot use squar

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread derick
On Thu, 10 May 2001, Andrei Zmievski wrote: > On Thu, 10 May 2001, Max Vysotskiy wrote: > > Well. It could be prevented with some directive. Something like > > Yeah, another ini directive that makes it very hard to make scripts compatible for multiple servers... Derick Rethans ---

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Andrei Zmievski
On Thu, 10 May 2001, Zeev Suraski wrote: > With no easy workaround such as \[\] or something like that? I don't think so. -Andrei * "Lack of planning on your part doesn't constitute an emergency on my part." * -- PHP Development Mailing List To unsubscribe, e-mail: [EMAIL

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Max Vysotskiy
Well You can use something like this: variable = documents.forms[0].elements['foo[]']; "Zeev Suraski" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > At 19:20 10/5/2001, Andrei Zmievski wrote: > >On Thu, 10 May 2001, Zeev Suraski wrote: > > > Why does it make m

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Zeev Suraski
At 19:20 10/5/2001, Andrei Zmievski wrote: >On Thu, 10 May 2001, Zeev Suraski wrote: > > Why does it make more sense? Is there any advantage in using this over > > using foo[]? By changing this behavior, we're actually losing > > functionality, not adding any. > >Interaction with Javascript is p

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Max Vysotskiy
"Andrei Zmievski" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Thu, 10 May 2001, Zeev Suraski wrote: > > Why does it make more sense? Is there any advantage in using this over > > using foo[]? By changing this behavior, we're actually losing > > functio

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Andrei Zmievski
On Thu, 10 May 2001, Zeev Suraski wrote: > Why does it make more sense? Is there any advantage in using this over > using foo[]? By changing this behavior, we're actually losing > functionality, not adding any. Interaction with Javascript is problematic if you use [] in the variable name. Tha

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Zeev Suraski
i" <[EMAIL PROTECTED]> >To: "Max Vysotskiy" <[EMAIL PROTECTED]> >Cc: <[EMAIL PROTECTED]> >Sent: Thursday, May 10, 2001 4:39 PM >Subject: Re: [PHP-DEV] multiselects and arrays > > > > On Thu, 10 May 2001, Max Vysotskiy wrote: > > > Th

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Andi Gutmans
At 07:02 PM 5/10/2001 +0300, Max Vysotskiy wrote: >Well. It could be prevented with some directive. Something like > >:-))) This kind of directive is evil and should never have been introduced :) Andi -- PHP Development Mailing List To unsubscribe, e-mail: [EMAIL PROTECTE

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Andrei Zmievski
On Thu, 10 May 2001, Max Vysotskiy wrote: > Well. It could be prevented with some directive. Something like > Or php.ini setting. -Andrei Linux is like living in a teepee. No Windows, no Gates, Apache in house. - Usenet signature -- PHP Development Mailing List

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Max Vysotskiy
Well. It could be prevented with some directive. Something like :-))) ""Adam Wright"" <[EMAIL PROTECTED]> wrote in message 001f01c0d969$6494ca00$8d010a0a@griffin">news:001f01c0d969$6494ca00$8d010a0a@griffin... > Just from my point of view, I've got a lot of legacy code that relies on the > fact t

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Adam Wright
ginal Message - From: "Andrei Zmievski" <[EMAIL PROTECTED]> To: "Max Vysotskiy" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, May 10, 2001 4:39 PM Subject: Re: [PHP-DEV] multiselects and arrays > On Thu, 10 May 2001, Max Vysotskiy wrote: &

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Max Vysotskiy
"Andrei Zmievski" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > That's been a pet peeve of mine as well. I think that if PHP sees > multiple variables with the same name in POST data, it should make an > array out of them.. And in GET data either I think. W

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Andrei Zmievski
On Thu, 10 May 2001, Max Vysotskiy wrote: > Thanx > But why not just to convert plain field names without [] to arrays?? > Is there any reasons to not doing this? That's been a pet peeve of mine as well. I think that if PHP sees multiple variables with the same name in POST data, it should make a

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Max Vysotskiy
Thanx But why not just to convert plain field names without [] to arrays?? Is there any reasons to not doing this? ""Colin"" <[EMAIL PROTECTED]> wrote in message 9dec79$aa9$[EMAIL PROTECTED]">news:9dec79$aa9$[EMAIL PROTECTED]... > > Example: > > I have a page with multiselect, which name is SEL1

Re: [PHP-DEV] multiselects and arrays

2001-05-10 Thread Colin
> 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 [ ] ). Sure it is allowed: http://ca.php.net/FAQ.php#7.14 - Colin -- PHP Development Mailing L