Ben verilen adresler dan (diziler) ile bir ağaç oluşturmak gerekiyor.
Ben url'lerin şu listesi var:
http://domain.com/a/a.jsp
http://domain.com/a/b/a.jsp
http://domain.com/a/b/b.jsp
http://domain.com/a/b/c.jsp
http://domain.com/a/c/1.jsp
http://domain.com/a/d/2.jsp
http://domain.com/a/d/a/2.jsp
Şimdi ben böyle bir dizi gerekir:
domain.com
a
a.jsp
b
a.jsp
b.jsp
c.jsp
c
1.jsp
d
2.jsp
a
2.jsp
Ben bu php ile nasıl yapabilirim?