adam291086 Posted January 9, 2008 Share Posted January 9, 2008 I have the url http://www.adamplowman.co.uk/adam/ftp/test.txt I want to remove /adam from it and put it back together http://www.adamplowman.co.uk/ftp/test.tx The problem is that the url could be http://www.adamplowman.co.uk/adam/john/luke/ftp/test.txt and i still only want to remove /adam and only have http://www.adamplowman.co.uk/john/luke/ftp/test.txt Any ideas? Link to comment https://forums.phpfreaks.com/topic/85197-solved-explode-help/ Share on other sites More sharing options...
The Little Guy Posted January 9, 2008 Share Posted January 9, 2008 <?php $str = "http://www.adamplowman.co.uk/adam/john/luke/ftp/test.txt"; echo str_replace("/adam",$str); ?> Link to comment https://forums.phpfreaks.com/topic/85197-solved-explode-help/#findComment-434649 Share on other sites More sharing options...
adam291086 Posted January 9, 2008 Author Share Posted January 9, 2008 god i am an idiot. I was using that above in my script. HA Link to comment https://forums.phpfreaks.com/topic/85197-solved-explode-help/#findComment-434663 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.