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
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 List
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
(I
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 an
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.
Why
Well. It could be prevented with some directive. Something like
?php_convert_multiple_to_array?
:-)))
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
On Thu, 10 May 2001, Max Vysotskiy wrote:
Well. It could be prevented with some directive. Something like
?php_convert_multiple_to_array?
Or php.ini setting.
-Andrei
Linux is like living in a teepee.
No Windows, no Gates, Apache in house.
- Usenet signature
--
PHP
At 07:02 PM 5/10/2001 +0300, Max Vysotskiy wrote:
Well. It could be prevented with some directive. Something like
?php_convert_multiple_to_array?
:-)))
This kind of directive is evil and should never have been introduced :)
Andi
--
PHP Development Mailing List http://www.php.net/
To
]
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:
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
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.
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
functionality,
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
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 more
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 http://www.php.net/
To unsubscribe, e-mail: [EMAIL
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
?php_convert_multiple_to_array?
Yeah, another ini directive that makes it very hard to make scripts
compatible for multiple servers...
You can iterate through document.FORMNAME.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 square
What I do when I need multidimensional arrays from forms, is name my
variables:
INPUT NAME=i::foo::bar VALUE= ...
i.e., I delimit the dimensions with ::. Then, on the page they are posted
to, I do:
?
parseInputVars('i');
?
And here is the code for that function, which looks for all
17 matches
Mail list logo