I am currently using something like:

PHP Code:

include "template.inc";

$to "to@domain.com";
$from "from@domain.com";

$t = new Template();
"email_user" => "email_user.ihtml",
"email_admin" => "email_admin.ihtml"

"to" => "$to",
"from" => "$from"

$user_body $t->parse("MyOutput1","email_user");
$admin_body $t->parse("MyOutput2","email_admin");


using phplib's template class (thanks freddy!)

anyway, i would much prefere to store these specific templates (they are are for emails and i will have quite a lot of them) in a database, i tried this, replacing email_user.ihtml with $email for example but it does not work, it apparently thinks that $email is the name of the template file as opposed to the actual text i want parsed. Any ideas?