Local Hero Posted February 19, 2013 Share Posted February 19, 2013 I have a folder that has a bunch of images. Then I have a script to view the images of that folder, it puts the images one by one on top of each other along with details about the image. I'd like to put the images into tables and have 2 or 3 images per row. I'm not sure how to do that? $search = $num; //$num is the search for image with a specific number $dir = "savedImage/"; $files = scandir($dir); foreach($files as $$key=>$value) { if(stripos($value, $search) !== false) { $array_of_images[] = $value; } } { foreach($array_of_images as $value) { echo "<a href='savedImage/".$value."' target='blank'>". $value ."'<br><img src=./savedImage/" . $value . " width=300></a><br><br>"; } } Quote Link to comment https://forums.phpfreaks.com/topic/274704-return-results-into-a-table/ 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.