I am trying to have php list all the directories in the current folder and any sub-directories of those folders, basically just 2 levels, but i cant not figure out how to do this. i need to be able to output the result as xml for use in a menu system. Can anyone help me out with this? i have been at it for hours:-(
Thanks!!
my directory structure is something like this:
Cars
-yellow
-red
Trucks
- 4wd
-2wd
The output should look like this:
<category Name="Cars">
<Item Name="yellow" Link="Cars/yellow"/>
<Item Name="red" Link="Cars/red"/>
</category >
<category Name="Trucks">
<Item Name="4wd" Link="Cars/4wd"/>
<Item Name="2wd" Link="Cars/2wd"/>
</category >