As the title says what I'm trying to do is count the number of images in a directory and output it as numbers so for example if there are 4 images I want the result to be:
01 | 02 | 03 | 04
I have this so far:
$count = glob('images/{*.jpg}', GLOB_BRACE);
foreach($count as $filecount) {
echo '<li><a href="#" id="' . $filecount . '">' . $filecount . '</a></li>';
}
which outputs path/filename.jpg but haven't a clue on how to convert that to a numbers array or even if i'm in the right ballpark.
As usual all help is appreciated and thanks in advance.
foreach ($count AS $index => $filecount)
– Josh Aug 16 '11 at 3:10