Thanks guys
With my first post just doing
print $content;
should have worked. Not with this one. So I tried eval. I have tried two different things and both give the most .... odd? parse error you've ever seen!
<?php
include("config.inc.php");
$content =
"$ordertpl = file_get_contents(\"order1.tpl.php\");
$ordertpl_sql = \"SELECT * FROM template_vars WHERE template='order1.tpl.php'\";
$ordertpl_qry = mysql_query($ordertpl_sql);
while($ordertpl_res = mysql_fetch_array($ordertpl_qry);
{
$ordertpl = str_replace($ordertpl_res['tvar'], $ordertpl_res['vcontent'], $ordertpl);
}";
$runcontent = eval($content);
$maintpl = str_replace("{content}", $runcontent, $maintpl);
print $maintpl;
?>
gives
Parse error: parse error, unexpected '=' in /home/mhbillin/wwwroot/mhbilling.co.uk/mhbilling/order.php(11) : eval()'d code on line 1
and
<?php
include("config.inc.php");
$content =
'$ordertpl = file_get_contents("order1.tpl.php");
$ordertpl_sql = "SELECT * FROM template_vars WHERE template=\'order1.tpl.php\'";
$ordertpl_qry = mysql_query($ordertpl_sql);
while($ordertpl_res = mysql_fetch_array($ordertpl_qry);
{
$ordertpl = str_replace($ordertpl_res[\'tvar\'], $ordertpl_res[\'vcontent\'], $ordertpl);
}';
$runcontent = eval($content);
$maintpl = str_replace("{content}", $runcontent, $maintpl);
print $maintpl;
?>
gives
Parse error: parse error, unexpected ';' in /home/mhbillin/wwwroot/mhbilling.co.uk/mhbilling/order.php(11) : eval()'d code on line 4
Anyone can help me with this last bit then I might tell you what it's for 🙂 but whether I do or don't you'll find out on the 1st Jan 2004...
Miniiiiiiiiiiiiii