I can get about as far as
<?
$content=fopen('layout.tpl', 'r');
$contents = fread($content,filesize('layout.tpl'));
$name="site name";
$lcontent="left content";
$content = "content";
$thingy = "##title##";
function replace($content, $thingy)
{
$newcontent=str_replace("$str", $template, $contents);
print $newcontent;
}
?>
then I get stuck on how to make it do two some exact code would be apreciated ty