PHP LIMIT help echo Images?

Kelly H

New member
Here is the code i have.

<? $album=$_GET['album']; ?>
<link rel="stylesheet" href="light box/css/lightbox.css" type="text/css" media="screen" />

<script src="light box/js/prototype.js" type="text/javascript"></script>
<script src="light box/js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<script src="light box/js/lightbox.js" type="text/javascript"></script>
<?
$dirname = "uploader/photo/$album/";
$images = scandir($dirname);
$ignore = Array(".", "..");
foreach($images as $curimg){
if(!in_array($curimg, $ignore)) {
echo "

<a href=\"uploader/photo/$album/$curimg\">

<a href=\"uploader/photo/$album/$curimg\" rel=\"lightbox [album]\"><img src=\"uploader/photo/$album/$curimg\" height=\"100\"/></a>";
};
};
?>


________________________________________________________________-

Here is what i would like

right now that echos all images in the directory (folder)
I would like it to echo 20 images and then after 20 images i would like it to creat a next button and then display the next 20 images.

If you could help that would be great thank you!
 
Back
Top