Something like:
PHP Code:
while ($yourfruit = $db->fetch_array($query))
{
a bunch of stuff.....
eval('$yourfuits .= "' . fetch_template('your_fruit') . '";');
}
eval('print_output("' . fetch_template('list_of_fruits') . '");');
your_fruit is just a template that uses the variable $yourfruit
list_of_fruits is just a template that has "Your fruit is: $yourfruits" in it.