can anyone shed some light on how i would go about counting the number of files in a dir?
i've tried using
$d = 0;
while (false !== ($file = readdir($handle))) {
$d++ ;
}
where do is the number of files in the directory.
This hasnt been working for me, so i thought i'd see if it's the statement itself that's wrong or just the context i'm using it in.