Strip A String Using Explode
Join the DZone community and get the full member experience.Join For Free
http://www.php.net/manual/en/function.explode.php In this example, I need to strip the page's current URL to take off anything that follows a ? in that URL.
$fs_refer= $_SERVER ['REQUEST_URI']; $fs_refer = explode("?", $fs_refer); echo "$fs_refer is now a URL without ?.
"; echo "$fs_refer is the bit that used to follow the ?."; ?>