Auto Display Images From Folder Using PHP
June 18th, 2008 | by King | Posted in » File, Image Galleries, Image Galleries II, Image Handling, Scripts
Save photos in a folder named as ‘images’ and use these scripts to display all photos in a fly.
Display Images From A Folder
<?php $files = glob("images/*.*"); for ($i=1; $i<count($files); $i++) { $num = $files[$i]; echo '<img src="'.$num.'" alt="random image">'." "; } ?>
Display Images With Image Name From A Folder
<?php $files = glob("images/*.*"); for ($i=1; $i<count($files); $i++) { $num = $files[$i]; print $num."<br />"; echo '<img src="'.$num.'" alt="random image" />'."<br /><br />"; } ?>
Display Images From Folder Script Download
Tags: gallery, image
Posted in: File, Image Galleries, Image Galleries II, Image Handling, Scripts
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Posted in: File, Image Galleries, Image Galleries II, Image Handling, Scripts
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0

me Says:
thnx, it worked! I did set the i=1 to 1=0 to display all the images ;-)
cm17 Says:
thank..