I'm trying to include a php file at a certain point in my template.
Including works fine, just it doesn't place it at the right place where I want it to be.
The news.php file will be included up front and not at the desired place {content} where it should go to.
I tried str_replace instead of ereg_replace, but str_replace displayed only the news.php page and truncated the rest of the page.
main.php:
$row = file_get_contents("template.htm");
$row = ereg_replace("{login}",$login,$row);
$row = ereg_replace("{menu}",$menu,$row);
$row = ereg_replace("{content}",eval(file_get_contents("news.php")),$row);
print $row;
template.htm:
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200"> </td>
<td width="407" id="menu">{menu}</td>
</tr>
<tr>
<td id="login">{login}</td>
<td id="content">{content}</td>
</tr>
</table>
I'd appreciate every help, I browsed thru the forum but could only find one closeley related post to my problem, but it didn't really help me any further as I was before.
thx