I have an array I\'m getting back from scandir, but it contains \".\" and \"..\" and I don\'t want it to.
\".\"
\"..\"
My code:
$indir =
simply use preg_replace to remove all kind of hidden's file from directory
$files = array(".", "..", "html", ".~html", "shtml"); $newfiles = preg_grep('/^([^.])/', scandir($files));