I am using scandir to list all the files in a directory. But there should be an exception for ./
, ../
and tmp
folder.
I already have this to exclude the dot and double dot:
$files = preg_grep('/^([^.])/', scandir($dir));
How can i add tmp
folder to it? (name of the folder is tmp)