Re: $_GET space in index changed to underscore
| From: | 1LT John W. Holmes | Date: | Thu, 23 Jan 2003 16:50:14 +0000 |
| Subject: | Re: $_GET space in index changed to underscore | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-132862@lists.php.net to get a copy of this message | ||
> Anyone who knows why get variables whit spaces in looking like this in
> the URL blah.php?aa+bb=1 is changed to aa_bb in $_GET resulting in
> $_GET['aa_bb'] instead of $_GET['aa bb']?
That's just what PHP does. It'll also convert any periods in a form element
name to an underscore.
Otherwise, if you have register globals on, it would try to create a
variable of "$aa bb" which doesn't make sense, or "$aa.bb" which
doesn't
make sense, either, because the dot is a concatinator.
---John Holmes...