Is there a better/simpler way to find the number of images in a directory and output them to a variable?
function dirCount($dir) { $x = 0; while (($file
$nfiles = glob("/path/to/file/[!\\.]*"); if ($nfiles !== FALSE){ return count($nfiles); } else { return 0; }