The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I'm preparing to embark on my most ambitious PHP project yet (a completely dynamic database driven web site combining news, user profiles, comments, columns and much more) and have decided that the project urgently needs some kind of template system to allow the coders to code it up without having to worry about presentation.

FastTemplate looks to me like the ideal solution - it's a template class sytem that allows template files to define the look of pages, while your own PHP code defines the content. Unfortunately the FastTemplate site has not been updated since PHP4 came out, and running the class under PHP4 introduces some unpleasant problems.

I've tried the advice in those posts but haven't managed to get it working yet. Has anyone here had any experience with this class - especially using it in PHP 4? Also, does anyone know of a good alternative that works with PHP 4?

This caused my about half a day of frustration, figured it out, felt
odd that the regex started working this way, felt stupid about the solution.
Funny thing is is that it seems (PHP4) to affect all the pattern matching
in this subtle fashion. Or wait this just occured to me, I could have just
replaced the ereg with a preg, oh well. There is a vague bug report about this for,
I think, PHP 4b1, which was left unresolved.

In class.FastTemplate about line 190-200 in the
parse_template function, the original line looks like this,