Log in

View Full Version : repeating a template


AN-net
02-06-2004, 10:22 PM
i want it to repeat a template over and over again for as mant entries as there are in a db table.
this is php code a i have:

$fgalindex= $DB_site->query("SELECT * FROM gallery_index");
while($galindex= $DB_site->fetch_array($fgalindex))
{
eval('$gallindex_lvl1 = "' . fetch_template('gallery_lvl1') . '";');

}

its currently only doing it once

AN-net
02-06-2004, 11:03 PM
can someone move this thread to the php forum?

Xenon
02-06-2004, 11:07 PM
add a . before the = ^^

AN-net
02-07-2004, 02:58 PM
ok i fixed that but still isnt showing all entries i have in my db table, it only is displaying one of them.

MindTrix
02-07-2004, 09:44 PM
What do you have inside the table? Looking at the PHP code there is nothing stopping it doing as you wish, it may reside in your HTML part of this in the template.

AN-net
02-07-2004, 11:07 PM
never mind, i put the period in the wrong place lol!
thanks for all your all help

Xenon
02-08-2004, 12:32 AM
:)

you're welcome