i wanted to make an image gallery showing only 40 images at a time through the highslide js plugin, all is well except when i get to the end of what the gallery should be, i get a blank page, or a page with the wrong number of images.
the images are labeled #-freebies.jpg for convenience, making the for() loop show what image is relative to what loop # its on. IE loop 30 shows image 30-freebie.jpg. to see what i am referring to look here: http://freebiespages.hostzi.com/PastPrizes.php?start=840&end=880 clicking next should display images 881 - 922 of the 951 or so images.
[php]
weedfreebies past winners$nts = $start + 40;
$nte = $end + 40;
$bts = $start - 40;
$bte = $end - 40;
echo <<<EOF
EOF;
echo ‘
for($i=$start;$i!=$end+1;$i++){
if(file_exists($path.$i."-freebie.jpg")){
$imagesize = @getimagesize($saved_imgs[$i]);
if($imagesize[3] == ‘width=“132” height=“64”’)
echo " “;
else{
$freebieslink = “http://weedfreebies.com/index.php?option=com_zoo&task=item&item_id=$i&Itemid=102”;
$page = ‘’;
$page .= ‘
$page .= ‘
$page .= 'Weedfreebies :<a href=”’.$freebieslink.’"’.$imagesize[3].’ target="_blank">Prize Page
’;
$page .= ’
echo $page;
}
}
if(!file_exists($path.$i."-freebie.jpg")){
$end++;
if($end>count($saved_imgs)){
$end = count($saved_imgs)-1;
}
}
}
echo ‘
echo ‘back::::next
’;
?>
[/php]