Page Stats
Visitor: 341
Display all Images from a folder in php using for loop.
for($i=1;$i<=4;$i++) { echo "<img src='image/$i.jpg' width='200px'>"; }
Count number of files from a folder.
$files = glob("image/*.jpg"); $filecount = count($files); echo "There were $filecount files";
Display all images from a folder having any name.
$dir=opendir("image"); while($file=readdir($dir)) { echo "<img src='image/$file' width='200px'>"; }