I'm writing a CMS-style application, and I can't quite figure out templating.
I have a function that returns the file contents of a templaet file within a themes directory. That part works fine. Inside one of those files is a mix between HTML and PHP variables, for example:
<html>
<title>$title</title>
<link href="$theme['css-path']" type="text/css" rel="stylesheet">
...
</html>
<!-- Just an example. ;) -->
And no matter what combination of eval(), echo and variables I use, I simply cannot get the correct page output WITH the variables parsed. I'm really puzzled... and I know it's possible, just look at vBulletin or MyBB. There are variables in those template files and that software works perfectly.
Any tips on templates would be greatly appreciated.