This is a basic example showing how PHP’s glob() function can be used to display any/all images from a directory in recursive fashion. For example, I adapted this technique to auto-display all images from a WordPress /uploads/ directory that had images organized by year, so recursive functionality was required to display the images from each year’s directory.