search for file name in file 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);