Is this the best way to remove URL parameters from a string containing an URL?
$url = "http://www.test.com/test.html?parameter=hey¶meter2=ho";
if (strstr($url, "?")) {
$url = strstr($url, "?", true);
}
I would think maybeIs there is a better one line-line solution?
It It seems so bad to run the same function twice.