Posted by Connector5 on 12/08/05 17:42
echo "<table>\n";
$picnum = 0;
$maxpics = 25;
while (($record = mysql_fetch_assoc($result)) && ($picnum < $maxpics))
{
if (($picnum / 5) == floor($picnum / 5))
{
echo "<tr>\n";
}
echo "<td>\n";
// GENERATE THUMBNAIL HERE
echo "</td>\n";
if (($picnum / 5) == floor($picnum / 5))
{
echo "/<tr>\n";
}
$picnum += 1;
}
echo "</table>\n";
"Jon" <jonra@netins.com> wrote in message
news:dn9g8n$drg$1@news.netins.net...
> All,
>
> I'm putting the final touches on a MySQL/PHP driven photo gallery I have
> built, and am down to one last task. I need to be able to display
thumbnails
> from the gallery in rows of 5 on the main gallery page. I've found many
> scripts out there that do this, but can't find one that works when the
photo
> data (fileName in this case) is coming from a MySQL DB where I need to
loop
> through values in a set of records. Does anyone have a script for doing
> this? Or maybe can throw me the algorithm I'll need to use? Thank you in
> advance.
>
>
Navigation:
[Reply to this message]
|