hi, i was wondering if there was a easier, less coded way to count the number of .jpg files in a folder?
heres what i'm using at the moment
<?
$dir = opendir("/home2/theuther/public_html/album/");
$files = readdir($dir);
$count = 0;
while (false !== ($files = readdir($dir))) {
foreach ($exts as $value) {
if (CheckExt($files, $value)) {
$count++;
}
}
}
echo $count;
?>
thanks, Comms