I want all CSV files in a directory, so I use
glob(\'my/dir/*.CSV\')
This however doesn\'t find files with a lowercase CSV extension.
Came to this link for glob with multiple files. Although it doesn't help with OP, it may help others who end up here.
$file_type = 'csv,jpeg,gif,png,jpg';
$i = '0';
foreach(explode(",",$file_type) as $row){
if ($i == '0') {
$file_types = $row.','.strtoupper($row);
} else {
$file_types .= ','.$row.','.strtoupper($row);
}
$i++;
}
$files = glob($dir."*.{".$image_types."}",GLOB_BRACE);