glob in php - Find paths matching pattern
<?php //path to directory to scan $directory = "../images/team/harry/"; //get all image files with a .jpg extension. This way you can add extension parser $images = glob($directory . "{*.jpg,*.gif}", GLOB_BRACE); $listImages=array(); foreach($images as $image){ $listImages=$image; } ?>
Wazzzy
source share