Welcome Guest, Not a member yet? Register   Sign In
Directory tree as an associative array?
#1

[eluser]kyleect[/eluser]
Consider the following:

Quote:/
file1
/dir1
file1
/dir2
file1
file2

What I'd like to do is access this structure as an associative array:

Code:
echo $array['dir1']['file1'];
echo $array['dir2']['file2'];

I can figure out how to write the file contents from the files, the real issue I'm having is finding a native or non native php function for listing directories as an associative array.


Messages In This Thread
Directory tree as an associative array? - by El Forum - 02-21-2009, 10:27 AM
Directory tree as an associative array? - by El Forum - 02-21-2009, 10:48 AM
Directory tree as an associative array? - by El Forum - 02-21-2009, 10:52 AM
Directory tree as an associative array? - by El Forum - 02-21-2009, 11:25 AM
Directory tree as an associative array? - by El Forum - 02-21-2009, 11:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB