I have an url which looks like page.php?stuff=stuff&stuff=stuff&order=sometext&page=number
and I want to remove the "order=sometext" part. I'm using this php code :
$link = $_SERVER['REQUEST_URI'];
$re = "/&order=/";
$link = preg_replace($re, "", $link);
And I'm looking for the correct pattern that should be $re to clear the "order=sometext" from the url. The "&page=number" part has to be kept when present, but isn't always there. Any ideas ?
Thanks in advance !