Closed elvispdosreis closed 8 years ago
That's a PHP thing isn't it? What's in $_GET
?
Yes the parse_str function converts the data $ _GET
I mean, Can you var_dump $_GET for me please?
the var_dump has the same output of slim however in debug appears as sent. check the picture
var_dump array (size=2) 'user_name' => string 'Elvis' (length=5) 'user_city' => string 'Rio Preto' (length=9)
if var_dump($_GET)
shows the .
replaced with a _
, then it's a PHP behaviour, not a Slim one.
thanks
2016-08-15 13:53 GMT-03:00 Rob Allen notifications@github.com:
Ah yeah. Here we go: http://www.php.net/manual/en/ language.variables.external.php#language.variables.external.dot-in-names
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/slimphp/Slim/issues/1961#issuecomment-239858284, or mute the thread https://github.com/notifications/unsubscribe-auth/AOj3JzbSTQUwmhMNuUIKqXhHnXhUX5ckks5qgJmBgaJpZM4Jkaiz .
$request->getQueryParams();
http://127.0.0.1:8082/api/user?user.name=Elvis&user.city=Rio+Preto
$queryParams = [ 'user_name' => 'Elvis', 'user_city' => 'Rio Preto' ]
the right would return $queryParams = [ 'user.name' => 'Elvis', 'user.city' => 'Rio Preto' ]