PHP: Get list of all filenames contained within my images directory [duplicate] June 13, 2023 by Tarik Try glob Something like: foreach(glob('./images/*.*') as $filename){ echo $filename; }