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>"; } } Link to comment https://forums.phpfreaks.com/topic/274704-return-results-into-a-table/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.