Wow, thanks for the quick reply.
Ok, I tried that but I get the following error : Warning: The length of the needle must not be 0 in c:\apache\htdocs\qboard\in2.php on line 56
This might have something to do with how I am using your code. Right, what I did was open the template like this :
This implodes the file. I then used your code and replaced the $moderators variable like this :
$m = template("$tpath/forumsbar.htm");
Then I used eval to replace the rest of the template variables :
str_replace($moderators, $tmp, $m);
Any thoughts ?