Relating PHP to source files

panli

New Member
Sorry if the title is a bit vague, couldn't think of a better way to phrase it, anyway.I'm attempting to make a page system for a website. Where you predictably start on page one, and then click page two and a different set of images appear. Each page has 12 images which are all thumbnail images. You click on the thumbnail image and lightbox brings up the high res shot. My current problem is that I cannot link the PHP script to the images correctly. To me it looks correct but it doesn't work, so clearly not. Info:Thumbnails are name "thumb1.jpg" from 1-24, full images are name "img1.jpg" from 1-24 \[code\]<?php$imgs = array(12, 12, );if(!empty($_GET["page"])) { $currPage = $_GET["page"];}else{ $currPage = 1;}for($i = 1; $i<$imgs[$currPage-1]+1;$i++){ echo "<a href='http://stackoverflow.com/questions/14085575/albums/norfolk weekender 2012/img'.$imgs[$currPage][$i].'.jpg' rel='lightbox[group]'><img src='http://stackoverflow.com/questions/14085575/albums/norfolk weekender 2012/thumb'.$imgs[$currPage][$i].'.jpg'/></a>";}?>\[/code\]. Anyway, I'm unsure why it doesn't work, and any help will be much appreciated.Ta.John.
 
Back
Top