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.
Building on Alex's tip this could help generally:
function glob_files ($d, $e) { $files = preg_grep ("/$e\$/i", glob ("$d/*")); sort ($files) return $files; }
where $d is the directory and $e is the extension.
$d
$e