I have a bit of PHP used to pulled a list of files from my image directory - it\'s used in a form to select where an uploaded image will be saved. Below is the code:
The easiest and quickest will be glob with GLOB_ONLYDIR flag:
GLOB_ONLYDIR
foreach(glob('../images/*', GLOB_ONLYDIR) as $dir) { $dirname = basename($dir); }