I am trying to trim the end of my URL after certain characters. I have my URL in a SESSION variable.
if(strpos($_SESSION['LP'],'ordrer'))
{
$Order1 = $_SESSION['LP'];
$Order2 = strpos($Order1, "ordrer");
$Order = substr($Order1,0,$Order2);
//$Order1 = $Order1(explode('ordrer', $Order1);
}
I'm first putting my URL in variable. Then looking if there is "ordrer" in it with strpos and then cut the end of my URL after "ordrer". Bassicly I have /Dossiers.php?ordrer=Numero or /Dossiers.php?ordrer=Status and I want to have /Dossiers.php? But I does not do anything to the URL, why is that? Also tried explode(), same result. Thanks