@PineSolPirateJul 14.2006 — #I've done it both ways, but I prefer to mix and match. Otherwise you might as well user perl or python or something. I think the mix and match is one of the best strengths of php.
@aaronbdavisJul 14.2006 — #mix and match is fine for small scripts. Most of my site is written that way. However, when you have a larger site, or at least larger scripts, most people will separate the presentation (i.e. HTML) from business logic (i.e. PHP) using some sort of template engine like [URL=http://smarty.php.net]Smarty[/URL]. In the long run, it make scripts much easier to maintain. People have also been talking alot about MVC frameworks which, from what I have read, make things much easier than a simple template engine.
@PineSolPirateJul 14.2006 — #Amen to smarty. Thats the coolest thing ever for letting coders and design people work together. I'm actually re-coding my site in it right now. As far as MVC frameworks, do you know any good ones? I was looking at some based on model2 but everything seems so poorly documented.
@NogDogJul 14.2006 — #I'm flexible to some degree, but I don't like having to read code that goes back and forth repeatedly. Sometimes I end up using echo with heredoc syntax to output a chunk of plain HTML rather than jumping out of PHP mode. Maybe it's because most of my first experiences with web programming were in Perl?
Now that I'm trying to do more with object-oriented PHP, I find myself putting chunks of HTML into methods, so that the overall program logic isn't interrupted by chunks of HTML, but instead by method calls such as [b]$this->printDocHead();[/b] or [b]$this->printNavigation();[/b].
@PineSolPirateJul 15.2006 — #Before I started using smarty I usually had a header and footer include, which helped clean things up. Nav includes are handy too.