I have a dir with about 20 thumbs in it. Is there a easy way to make PhP cycle through an array and display those on a page? I have some php/js experience I just cant get my head around how to do this.
I use this to display a random pic from the dir, so i was hoping I could just add on to it to display all the images...
-------------------------------
$path = "../Photos/FP_Thumbs/";
foreach (glob($path. "*.jpg") as $imagename) {
$images[] = $imagename;
}
$image = $images[ rand(0,(count($images)-1)) ];
-----
then I just plug in $image into a <Img src> tag....
So i know I have my array loaded with all the images... im just not sure how to pull them all out....
any suggestions would be great...
thanks
D.
I use this to display a random pic from the dir, so i was hoping I could just add on to it to display all the images...
-------------------------------
$path = "../Photos/FP_Thumbs/";
foreach (glob($path. "*.jpg") as $imagename) {
$images[] = $imagename;
}
$image = $images[ rand(0,(count($images)-1)) ];
-----
then I just plug in $image into a <Img src> tag....
So i know I have my array loaded with all the images... im just not sure how to pull them all out....
any suggestions would be great...
thanks
D.