I need to open a templatefile, and save the parsed results in a variable.
Can anybody help me with an example?
example is based of the article from phpbuilder.com:
$my_color = "blue"; // we'll use this later
$t = new Template("/home/mydir/mytemplates/");
// create a template object named $t
// set MyFileHandle = our template file
// set template variable some_color = $my_color value
// save the parsed output in the variable $myvar
$myvar = $t->parse("MyOutput","MyFileHandle");
// set template variable MyOutput = parsed file
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.