I have a url like:
"http://www.example.com/mem.php?myInquir ... h=47423628#"
I need to get the actual page URL without the options at the end:
"http://www.example.com/mem.php"
I'm just looking to use a simple rtrim but I'm not sure how to format it.
rtrim a URL
Moderator: General Moderators
-
cpetercarter
- Forum Contributor
- Posts: 474
- Joined: Sat Jul 25, 2009 2:00 am
Re: rtrim a URL
Code: Select all
$bits = explode("?", $url);
$trimmed_url = $bits[0];