使用PHP或Javascript生成自动照片库

So I have a huge amount of car photos which I have sorted in a structure looking like this (this is an fictive example to demonstrate my principle):

Cars > Audi > Sports cars > '5 pictures'

Cars > Audi > Family cars > '3 pictures'

Cars > BMW > Family cars > '5 pictures'

I will upload the folder named Cars to my server.

Now what I want is a snippet/script that reads my directory then generate and return html for an simple photoalbum. There is no need for the album to be advanced, I just want to skip writing the photoalbums HTML manually by hand.

I'm guessing that this has been done many times already though I cant find a simple demo of it. I would be willing to pay for it but then I would of course have higher demands regarding the quality of the code.

If anything is unclear please let me know and I will update my question ASAP!