I know I can do this...
glob(\'/dir/somewhere/*.zip\');
...to get all files ending in .zip, but is there a way to return all f
.zip
A quick way would be to glob() for everything and use preg_grep() to filter out the files that you do not want.
glob()
preg_grep('#\.zip$#', glob('/dir/somewhere/*'), PREG_GREP_INVERT)
Also see Glob Patterns for File Matching in PHP