From Habari Project
Using the RawPHPEngine, theme creators use PHP directly in their templates, embedded with HTML. It's the most commonly used template engine. If you'd rather avoid using PHP, try the HiEngine template engine. If you have experience with WordPress, you might want to read Template Tags, which gives an overview of the similarities and differences between theming for Habari and WordPress.
Pages in the wiki about theming should have examples that will run using the RawPHPEngine.