Possible Duplicate:
PHP replaces spaces with underlines
Example: test.php?foo.bar=1
print_r($_GET);
// Array ( [foo_bar] => 1 )
Here is a quote from PHP manual
Dots in incoming variable names
Typically, PHP does not alter the names of variables when they are passed into a script. However, it should be noted that the dot (period, full stop) is not a valid character in a PHP variable name. For the reason, look at it:
<?php $varname.ext; /* invalid variable name */ ?> Now, what the
parser sees is a variable named $varname, followed by the string concatenation operator, followed by the barestring (i.e. unquoted string which doesn't match any known key or reserved words) 'ext'. Obviously, this doesn't have the intended result. For this reason, it is important to note that PHP will automatically replace any dots in incoming variable names with underscores.
if the register_globals directive is set, array keys in $_GET must be used as variable names and dots, spaces as well as a variety of other characters aren't allowed in php variable names. In fear that you have that directive set, php replaces those 'invalid' characters
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With