ok, im relatively a newbie but have worked through a larry ullman php5 book, and am starting my own scripts.
-The Code below displays 1st image mentioned in the array.
-I want it to loop through and display all the images in the array.
Can someone point me to the right way of doing this?
code so far...
<?php
header("content-type: image/jpg");
$file=array('sized_flowers.jpg', 'toyspic.jpg');
foreach($file as $k){
$src_img = imagecreatefromjpeg("$k");
$srcsize = getimagesize("$k");
$dest_x = 100;
$dest_y = (100 / $srcsize[0]) * $srcsize[1];
$dst_img = imagecreatetruecolor($dest_x, $dest_y);
// Resize image
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_x, $dest_y, $srcsize[0], $srcsize[1]);
// Output image
imagepng($dst_img);
imagedestroy($src_img);
imagedestroy($dst_img);
}
?>