pneudralics Posted November 13, 2008 Share Posted November 13, 2008 Just need a tip to start.. I'm want to display a folder with all the images. How do I do that? Quote Link to comment https://forums.phpfreaks.com/topic/132560-how-do-i-display-a-folder-with-images/ Share on other sites More sharing options...
.josh Posted November 13, 2008 Share Posted November 13, 2008 you can use glob and use a foreach loop Quote Link to comment https://forums.phpfreaks.com/topic/132560-how-do-i-display-a-folder-with-images/#findComment-689286 Share on other sites More sharing options...
xcoderx Posted November 15, 2008 Share Posted November 15, 2008 this way $dir="folder"; if ($dir_list = opendir($dir)) { while(($filename = readdir($dir_list)) !== false) { echo "<img src=\"$dir/$filename\" height=\"50\" width=\"50\"/><a href=\"$dir/$filename\"><b> $filename</b></a><br /><br />"; } closedir($dir_list); } else { } Quote Link to comment https://forums.phpfreaks.com/topic/132560-how-do-i-display-a-folder-with-images/#findComment-690620 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.