In it’s most basic form, PHP Template Preprocessor can replace tags with values set in PHP , but it also has an advanced sort of “syntax” that you can use.
You should see http://lazorhost.com/template/documentation/ to see what kind of things you can do with it.