i use a php script that uses a certain method of making and calling html templates. i like the way it works and would like to adapt the technique to design my own site, i find it suits my needs well but i can't figure out how the back end of it works. i'm a php green horn, i've researched all kinds of ways but i can't make any head way. if someone can explain or point me in the right direction it would be deeply appreciated.
here's how it works.
there is a .txt file that contains all the templates.
there are a set of control characters. this character "#" denotes the start of a template and must be the first character in a line, a template ends where a new one begins. this char "!" invokes a template elsewhere in the same file.
example of how it works is like this,
-----------------------.txt file--------------------------
#header
<table>
<tr><td>
blah blah blah
#footer
</td></tr>
</table>
!header
!footer
index.php echo's the header and footer from the .txt file, the output is
"blah blah blah".
how are "#" and "!" being assigned their tasks?
the index.php file requires a lib file that contains the code to call the .txt file.
please understand i've been banging my head trying to get a clue. i'm starting to think php is over my head.