Home > Article > Backend Development > PHP converts a path array into a directory tree
<code>$paths = ['aa','aa/bb','ww/yyy','aa/kk','xx/oo/pp']; </code>
According to this array, convert it into the structure of the directory tree, as follows:
aa
-bb
-kk
ww
-yyy
xx
-oo
--pp