search on all files in php code example
Example: php dirpath multiple file extensions
$files = glob("/path/to/directory/*.{jpg,gif,png}", GLOB_BRACE);
print_r($files);
$files = glob("/path/to/directory/*.{jpg,gif,png}", GLOB_BRACE);
print_r($files);