I have this
$string = $_SERVER['QUERY_STRING']; $string = str_replace ("page=", "", $string);
and on my string it might be index.php?ID=4&page=4, i can remove the page= part but how can i remove the 4 which could also be a 1 or 7 or 99....
$string = preg_replace("@page=[0-9]*@", '', $string);
Something like that?
works well but after a while i get this
?Page_ID=12&&&&Page_No=11
I guess it's not removing the & and everyime i click another numberr it adds another one??
so add it to the regex....
??
This is the regex: @=[0-9]@ You need to modify that to take into account the & symbol. So how do you do that? You add it to the regex. @&page=[0-9]@