Ive got the basics working, it replaces variables.

Now what I need it to do is replace for example {header} with the contents of header.tpl. How would I do that? I'm thinking of trying to use preg_match to do it, but im not too sure how to use it, etc.
Is this the best way to do it?

Thanks,
timtam
timtamboy63 Reviewed by timtamboy63 on . Trying to code my own template engine. Ive got the basics working, it replaces variables. Now what I need it to do is replace for example {header} with the contents of header.tpl. How would I do that? I'm thinking of trying to use preg_match to do it, but im not too sure how to use it, etc. Is this the best way to do it? Thanks, timtam Rating: 5