Re: [phplib] Dynamic block fetching help From: Michael Anthon (michael <email protected>)
Date: 03/19/01

Should be something more like this I believe....

$tpl = new Template(".");
$tpl->set_file(array("form"=>"form.tpl", "card"=>"card.tpl"));
$tpl->set_block("form", "recipient_block", "recipient");
$num = "";
for($i=0; $i<$r; $i++){
    $tpl->set_var("TO", $to);
    $tpl->set_var("TO_EMAIL", $to_email);
    $tpl->parse("recipient", "recipient_block", true);
}
...
//I'm assuming these other vars are in card.tpl?
$tpl->set_var("IMAGE", $image);
$tpl->set_var("IMGSIZE", imgsize($image));
$tpl->set_var("CAPTION", $caption);
$tpl->parse("CONTENT", "form");
$tpl->pparse("CONTENT", "card");

Cheers
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>