Jump to content

tree from list


kingpin393

Recommended Posts

Hi I have a list of files in an array:

/dir1/file.txt

/dir2/dir3/file.txt

/file.txt

...

 

I want to create a tree list from that:

-dir1

  -file.txt

-dir2

  -dir3

    -file.txt

-file.txt

...

 

How could I go about this?  (in the original array I know what items are files and which are directories if that helps...)

 

Thanks,

Kevin

Link to comment
https://forums.phpfreaks.com/topic/129117-tree-from-list/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.