[PATCH] Valid syntax for array creation from form elements
| From: | Jesse McCarthy | Date: | Wed, 28 Nov 2001 13:10:21 +0000 |
| Subject: | [PATCH] Valid syntax for array creation from form elements | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-71906@lists.php.net to get a copy of this message | ||
This is a re-posting. I sent this a few days ago and got no response, which
wasn't exactly what I had in mind. Following is the original message:
I'd like to patch PHP to allow for an XHTML-valid syntax for creating PHP
arrays from HTML elements 'input' (groups of type="checkbox") and
'select'
(multiple="multiple"). Square brackets are not allowed in XHTML identifiers,
so the current syntax name="someName[]" or name="someName[someKey]" is not
valid. Square brackets are also not allowed in ECMAScript identifiers (e.g.
variable names) or directly in CSS selectors. I propose a simple, valid
alternative syntax, perhaps something like name="someName__" or
name="someName__someKey__". I'd like to get feedback on the likelihood of
that conflicting with any established practices or conventions (I know it
would work fine for me), or suggestions of a better syntax.
I'd also like to get a little guidance on exactly how to proceed with
submitting such a patch. As far as I can see this would only require
modifications to php_variables.c, rfc1867.c, and type.c.
When responding to this thread, please CC me because I am not subscribed to
the list.
Thanks,
Jesse McCarthy