Created
October 31, 2010 21:47
-
-
Save mattijs/657201 to your computer and use it in GitHub Desktop.
Break down a query string in PHP 5.3 using an anonymous function
This file contains 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
$chop = function($query) { | |
parse_str($query); | |
unset($query); | |
return get_defined_vars(); | |
}; | |
$query = $chop("catid=1&follow=false"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment