I had a look around but I'm not sure I can find a specific answer so I apologise if I've missed a suitable post, please link me to it :)
I'm creating a script to search a folder for more folders, and compile a list of all the files in each folder into a multi-array. The folder names will be random so I'm a little lost on how to extract them using a foreach loop.
I'm also confused about the second array in "[0] => Array". My output data from my script currently looks like this:
Array
(
[0] => Array
(
[folders] => Array
(
[album 1] => Array
(
[0] => wallpaper-1089283.jpg
[1] => wallpaper-2549931.png
[2] => wallpaper-379108.jpg
[3] => wallpaper-38130.jpg
)
[album 2] => Array
(
[0] => ns75FqFLk1v6jEmecgu25IOk8yB.jpg
[1] => wallpaper-1627330.jpg
[2] => wallpaper-1629402.jpg
)
[album 3] => Array
(
[0] => wallpaper-1042083.jpg
[1] => wallpaper-176023.jpg
[2] => wallpaper-2624435.jpg
)
)
)
)
So really I want to get that data to output to some html like below. I haven't really done much work with multi arrays and I'm hoping I can learn :)
<div>
<img src="image.jpg"/>
<img src="image.jpg"/>
<img src="image.jpg"/>
</div>
<div>
<img src="image.jpg"/>
<img src="image.jpg"/>
<img src="image.jpg"/>
</div>
<div>
<img src="image.jpg"/>
<img src="image.jpg"/>
<img src="image.jpg"/>
</div>