On Unix, you can use preg_grep
to filter out filenames that start with a dot:
$files = preg_grep('/^([^.])/', scandir($imagepath));
On Unix, you can use preg_grep
to filter out filenames that start with a dot:
$files = preg_grep('/^([^.])/', scandir($imagepath));