viewing image from directory

hi i am new to php and have started learning about a week ago. anyway i am trying to populate a page with images that are in a folder on my server.

first of i tested just having the picture display, that worked. next i tryed adding thumbnails which link to the full picture (so i can add fancy box functionality) however when testing it just displayed the same large image over and over the code i am using is displayed below

i have had help from a few sites when doing this code

[php]<?php $files = glob("img/rothley/*.*"); ?>

<?php $thumbs = glob("img/thumbs/*.*"); ?> <?php for ($i=1; $i<count($files); $i++) { $img = $files[$i]; for ($t=1; $t<count($thumbs); $t++) { $thm = $thumbs[$t]; echo 'random image'."  "; }} ?>[/php]

I just used the following site’s tutorial to produce a gallery. Maybe it can help you as well:

http://www.devtek.org/tutorials/image_gallery.php

Sponsor our Newsletter | Privacy Policy | Terms of Service