Created
June 14, 2015 10:42
-
-
Save Swader/d7aea91da8441340d0d8 to your computer and use it in GitHub Desktop.
qprw.php
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
$function = new Twig_SimpleFunction('qprw', function (array $replacements) { | |
parse_str($_SERVER['QUERY_STRING'], $qp); | |
foreach ($replacements as $k => $v) { | |
$qp[$k] = $v; | |
} | |
return '?'.http_build_query($qp); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment