!!!!! FORMATTING PROBLEM WITH FIRST !!!!!
when the function allDirs($dir) is changed to return an array, only the top level directories are returned.
for example, if i had the directory tree:
/images
--/photos
----/prom
/project
--/english
----/beloved
--/math
----/calculus
/profile
the original function as given in earlier posting prints out:
/images
/images/photos
/images/photos/prom
/project
/project/english
/project/english/beloved
/project/math
/project/math/calculus
/profile
if i change the function to return an array, it only returns the array:
$directories[0] = "/images"
$directories[1] = "/project"
$directories[2] = "/profile"
i'm pretty sure the problem has to do with the recursive function call. and chdir($dir) is very necessary -- i accidently removed it once and it didn't work at all.
thanks for all your help guys~~~