What I want to to do is insert a new td after showing 5 thumb images, and
continue with the next picture on the next row.
something like this
__
|pic1 | pic2 | pic3 | pic4 | pic5 |
__
|pic6 | pic7 | pic8 | pic9 | pic10 |
Humani Power wrote:
hi list. I wonder if anyone can help me with this.
i have a database with the file name of several images stored in a
filesystem, and I want to create a table containing the image results of a
query.
this is my code
snip
while ($rows=mysql_fetch_assoc($getpic))
Hotmail sucks
but try this
[code]
$counter = 1;
while ($rows=mysql_fetch_assoc($getpic))
{
//close the tr tag after 5 photos usng the mod function to check the counter
if($counter % 5 == 0) {
echo ;
//reset the counter
$counter = 1;
}
extract ($rows);
echo ;
echo ;
$counter++;
}
-Mensaje original-
De: Stut [mailto:[EMAIL PROTECTED]
Enviado el: Lunes, 03 de Septiembre de 2007 06:31 p.m.
Para: Humani Power
CC: php-general@lists.php.net
Asunto: Re: [PHP] Create a matrix gallery
Humani Power wrote:
hi list. I wonder if anyone can help me with this.
i
4 matches
Mail list logo