•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 392,048 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,321 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2998 | Replies: 0
![]() |
•
•
Join Date: Jan 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hi i have this code to create a photo gallery on my website.
i was wondernig what code would be needed to limit the gallery to only show 10 images per page and to add links at the bottom to allow progression through the gallery.
many thanks
chris
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
</head> <body bgcolor="#FFFFFF">
<div align="center"><center>
<?php
$a = '0';
$filepath = "thumb";
$url_path = "main";
$dir = dir($filepath);
echo "<table border=\"0\" cellpadding=\"5\" cellspacing=\"5\" width=\"75%\">";
while($entry=$dir->read()) {
if($entry == "." || $entry == "..") {
continue;
}
$fp = @fopen("$filepath/$entry","r");
if ($a == '0') {echo "<tr>";}
if ($a == '5') {echo "<tr>";}
if ($a == '10') {echo "<tr>";}
if ($a == '15') {echo "<tr>";}
?><td>
<a href="<? echo "$url_path/$entry" ?>">
<img src="<? echo "$filepath/$entry" ?>" alt="<? echo $entry ?>"></a>
</td>
<?
$a = $a + 1;
}
?>
</tr>
</table>
</center></div>
</body>
</html>i was wondernig what code would be needed to limit the gallery to only show 10 images per page and to add links at the bottom to allow progression through the gallery.
many thanks
chris
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
access activation api biometrics blog blogger blogging blogs code combo competition dani daniweb data development dreamweaver dropdownlist gdata gentoo google gpl hd html innovation jpeg key linux media microsoft module net news openbsd photo php product programming rss search security serial source spam tags vista web windows wysiwyg xml
- Photoshop web photo gallery to dreamweaver (Site Layout and Usability)
- Table width (HTML and CSS)
- PHP Members HELP W/DB Images (PHP)
- php script displays the source code on invokation (PHP)
- ecommerce online photo gallery (eCommerce)
Other Threads in the PHP Forum
- Previous Thread: Turck mmCache no more?
- Next Thread: Domain Manager Problem


Linear Mode