I have a page that requires a loop to loop through pictures of a specific listing. The previously uploaded and are prefixed with that ID of a particular listing. IE. ListingID = 10284, so the image files are something like this 10284_1.jpg, 10284_2.jpg, etc. What I need to do is use the file exists function in php to find out how many files are in given folder with that prefix (in this case 10284). I have searched but can't find a solution for this particular problem.