note 106403 deleted from language.variables.external by danbrown
| From: | danbrown@php.net | Date: | Tue, 15 Nov 2011 16:52:23 +0000 |
| Subject: | note 106403 deleted from language.variables.external by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-184511@lists.php.net to get a copy of this message | ||
Note Submitter: luca at accomazzi dot it
----
Somebody wrote that spaces, dots etc do not get converted into underscore for arrays. I find this to
be false. If I try
<input type='checkbox' name="a b[1]" />One</label>
<input type='checkbox' name="a b[2]" />Two</label>
<input type='checkbox' name="a b[3]" />Three</label>
Then on form submission I get
Array
(
  [a_b] => Array
    (
      [1] => on
    )
I'm using PHP 5.3.6 and, by the way, I think that these substitutions only made sense in the
old, bad times when register_globals was almost always on. Now they are just a pain in the stop bits
and should be avoided.