PHP: Get list of all filenames contained within my images directory [duplicate]

Try glob

Something like:

 foreach(glob('./images/*.*') as $filename){
     echo $filename;
 }

Leave a Comment