Created
July 3, 2017 05:48
-
-
Save qwersk/910f567d1caa191eeb03e31af6c10c5a to your computer and use it in GitHub Desktop.
REMOVE GET PARAMETER FROM URL #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
$query = $_SERVER['QUERY_STRING']; | |
$query_arr = explode("&", $query); | |
$count_arr = count($query_arr); | |
for($j = 0; $j < $count_arr; $j++){ | |
if(strpos($query_arr[$j], "pagen") !== false){ | |
//echo $j . "<br />"; | |
unset($query_arr[$j]); | |
//$query_arr = array_values($query_arr); | |
} | |
} | |
$query = implode("&", $query_arr); | |
print_r($query); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment