<?php foreach (glob("*.txt") as $filename) { echo "$filename size " . filesize($filename) . "\n"; } ?>
Is there any way to list how many files there are? Like, "There are 426 Files in this directory"
Why not just add...
$count++;
...inside the foreach loop and then get it to print "There are $count files in the directory";
Or set the glob command to it's own variable and [man]count[/man] the array.