I have a string with a full URL including GET variables. Which is the best way to remove the GET variables? Is there a nice way to remove just one of them?
This is a code that works but is not very beautiful (I think):
$current_url = explode('?', $current_url);
echo $current_url[0];
The code above just removes all the GET variables. The URL is in my case generated from a CMS so I don't need any information about server variables.