2
I am creating a listing of images contained inside a folder, but I would like to count the amount of files inside the folder, how do I? Below 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."\">';
}
?>
That’s exactly what I was looking for, thank you very much :D
– Leno Sousa