Created
September 16, 2014 14:50
-
-
Save arioch1984/2218f63a22acd40f4cda to your computer and use it in GitHub Desktop.
Function for remove get variables from url
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
<?php | |
//Remove get variables from url | |
function removeqsvar($url, $varname) { | |
return preg_replace('/([?&])'.$varname.'=[^&]+(&|$)/','$1',$url); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment