I have an array filled with paths looking like this:
library/main/single/list.php
library/article/grid/thumbs.php
library/footer/tiny.php
These files and folders exists on my http://localhost/test/
I also have path that is http://localhost/new/
What I want to do
What I need to do is move the files while keeping the current file structure (with directories intact) to the new location.
The result should be like this
- http://localhost/new/library/main/single/list.php
- http://localhost/new/library/article/grid/thumbs.php
- http://localhost/new/library/footer/tiny.php
Is there an easy way to do it or do I have to cut every string by its slash?
You could try: