images again

From: Date: Fri, 11 Apr 2003 12:48:33 +0000
Subject: images again
Groups: php.general 
Request: Send a blank email to php-general+get-143491@lists.php.net to get a copy of this message
I have this code (see below) and you guys (the list) have helped me create it, but I am stuck one more time. I am trying to figure out how to display the images with only 5 images per row for as many rows as it takes for all of the images. Can someone give me an idea where to go from here to accomplish this? Here is the code: <script language="javascript" type="text/javascript"> <!-- function photo_open(link, width, height) { if(!width){width = 640;} if(!height){height = 480;} var photoWindow = window.open(link,"photo",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=2,resizable=0,width='+width+',height='+height); } //--> </script> <? $thumbnail_dir="pictures/thumbs/"; $picture_dir="pictures/pictures/"; $fp=opendir("$thumbnail_dir"); $fp2=opendir("$picture_dir"); while (($files=readdir($fp))&&($files2=readdir($fp2))) { if (preg_match("/.jpg/",$files)) { $thumbnail = $thumbnail_dir.trim($files); $thumb_image_size = getimagesize($thumbnail); $image = $picture_dir.trim($files2); $image_size = getimagesize($image); print("<a href=\"javascript:photo_open('".$picture_dir.trim($files2)."','".$image_size[0]."','".$image_size[1]."');\"><img src=\"".$thumbnail."\" ".$thumb_image_size[3]."></a>\n");
     }
} closedir($fp); closedir($fp2); ?> This code displays all of the images with proper links, but it has no form. _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail

« previous php.general (#143491) next »