PHP: glob Function
<?php /* Find all image files in image folder */ $images = glob($imagePath.'*.{gif,jpeg,jpg,png}',GLOB_BRACE); ?>