note 88328 deleted from language.variables.external by danbrown
| From: | danbrown@php.net | Date: | Wed, 09 Mar 2011 14:35:22 +0000 |
| Subject: | note 88328 deleted from language.variables.external by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-177693@lists.php.net to get a copy of this message | ||
Note Submitter: chris at chriswere dot com
----
In addition to anonymous' list of characters that are replaced with an underscore.
If you use arrays in your variable names, the second and subsequent levels are not replaced. For
example:
<input name="a field name" />
<input name="data[first data]" />
<input name="data[second data]" />
will produce $_POST as follows:
array(
"a_field_name" => ...
data => array(
"first data" => ...
"second data" => ...
)
);
I expect this is the same with other characters, not just space, but haven't tested this.
Ideally if register globals is off, this replacement wouldn't occur as it isn't necessary
- but we have to deal with it.