Scooby08 Posted July 2, 2010 Share Posted July 2, 2010 I'm looking for a simple way to remove the top directory from a path like so: /one/two/1.php Then I would like to remove "/one" so the path would now be like so: /two/1.php Thanks for any suggestions! Quote Link to comment Share on other sites More sharing options...
Cagecrawler Posted July 2, 2010 Share Posted July 2, 2010 <?php $path = '/one/two/1.php'; echo substr($path, strpos($path, '/', 1)); Quote Link to comment Share on other sites More sharing options...
Scooby08 Posted July 2, 2010 Author Share Posted July 2, 2010 Lovely! Thank You Quote Link to comment 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.