I'm creating a list of images contained within a folder, but I would like to count the amount of files inside the folder, how do I? Here is the code I'm using:
<?php
$pasta = 'imagens/';
$arquivos = glob("$pasta{*.jpg,*.JPG,*.png,*.gif,*.bmp}", GLOB_BRACE);
foreach($arquivos as $img){
echo '<img src=\"imagens/".$img."\">';
}
?>