Log in

View Full Version : Cleaning Up A String



Titan85
07-01-2007, 03:36 PM
Hello, I am trying to take a string like
http://something.com/navigation and have it just show "/navigation". I am thinking about using str_replace since all the urls up to the "/navigation" will be the same but think there could be a better way of doing this. Anyone have an idea? Thanks

Twey
07-01-2007, 09:14 PM
parse_url($tring, PHP_URL_PATH);

Titan85
07-02-2007, 04:52 AM
Thanks, thats what I was looking for.