sajjad
01-28-2006, 07:40 PM
After many hours i finally got a code to display images with thumbnails, but the problem is that i want 2 images per page. How can i do this with pagination like
Prev 1 2 3 Next
This is the code I used to get images:
$handle_dir = opendir($p);
$x = 0;
while($file = readdir($handle_dir))
{
if($file!="." && $file!=".." && $file!="thumbs")
{
echo "<a target='_blank' href='". $p."/".$file."' ><img style='margin:3px;' src='".$p."/thumbs/"."$file'></a>";
$x++;
}
}
how can i make pages for them
Prev 1 2 3 Next
This is the code I used to get images:
$handle_dir = opendir($p);
$x = 0;
while($file = readdir($handle_dir))
{
if($file!="." && $file!=".." && $file!="thumbs")
{
echo "<a target='_blank' href='". $p."/".$file."' ><img style='margin:3px;' src='".$p."/thumbs/"."$file'></a>";
$x++;
}
}
how can i make pages for them