I run a rather large PHP driven website, centerfuse.net. Originally, the site was done in perl using the HTML::Template module to separate HTML from Perl code. I didn't really care for that, and when I started PHP I simply hardcoded the HTML in the php document, which is pretty common, but gets ugly as the code gets larger. So, since almost al of the HTML is structured with tables, i've developed a class for building tables that works well and is quite versatile (there's probably similar ones out there). It uses functions like $table->start_table(), $table->start_row, $table->add_td, etc...
I'm currently starting work on a new site and I'm debating whether or not to use templates instead of my table class. I really don't like separating the HTML from the PHP completely, but I was just curious as to what everyone else's preference is, and why.
-Jim Keller
http://www.centerfuse.net