Created
February 6, 2016 17:19
-
-
Save Bat-Chat/b131d9c9fd2a484f5811 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $parts = parse_url('http://example.com/user/22?r=4'); | |
| // $parts return: | |
| // Array | |
| // ( | |
| // [scheme] => http | |
| // [host] => example.com | |
| // [path] => /user/22 | |
| // [query] => r=4&e=key | |
| // ) | |
| parse_str($parts['query'], $query); | |
| // $query return: | |
| // Array | |
| // ( | |
| // [r] => 4 | |
| // [e] => key | |
| // ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment