Hi,
First of all phpbb doesn't use tbl files, it uses tpl files, which are template files.
Templates separte presentation & business logic, so that modifying one doesn't affect the other.
You can achive the likes of phpbb by using a template engine, one of the popular template engine is Smarty http://smarty.php.net
Hope this helps you.