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? Quote 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); ?> Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/85197-solved-explode-help/#findComment-434663 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.