php - List o paths to hierarchical array -


i have serialized data list of filepaths each 1 or without 1 or more files inside.

array   0 => 'config.ini'   1 => 'folder/file1.php'   2 => 'folder/folder2/file2.php'   3 => 'folder/folder2/folder3/file3.php'   4 => 'folder/folder2/folder3/file4.php' 

the first 1 in root folder, outside subdirectory

and convert array multidimensional hierarchical array, being folder3 sub-array of folder2 , sub-array of folder1.

with this answer succeeded. problem is, because created different purpose, array files (wit extensions) being considered more dimensions, instead of being appended values of last entry. e.g: file3.php , file4.php should values of folder3, not indexes.

i tried modify myself reference 1 of few features don't understand in php.

if worth mention, i'm converting structure build treeview.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -