On Tuesday 05 August 2003 05:13 pm, Derrick Fogle wrote: > Thoughts on frequent switching in and out of PHP mode: > > <? switch in, do some code > ?>Switch out, static HTML > <? switch in, do more code > ?>Switch out, more static HTML > > I've found that I prefer programming this way, for the most part, > putting most of the heavy PHP programming at the top, and then using > static HTML interspersed mostly with quick <?= $variable ?> statements > for what users see. > > I'm sure there's more than one viewpoint out there, so I'd like to hear > a couple of them. Is this frequent mode switching good, bad, or > indifferent?
As long as you're organize, and consistent, and coding readably, that should be fine. Basically what I do is I try to separate programming/logic with presentation as much as possible. Put most programming on the top (PHP, Database query, etc) and presentation on the bottom (HTML part with some PHP for logic and displaying variable). > Is there a point at which the mode switching starts to > seriously degrade performance and reliability? Not that I know of. I am pretty sure the answer to your question is No. RDB -- ------------------------------------------------- /"\ ASCII Ribbon Campaign against HTML \ / email and proprietary format X attachments. / \ ------------------------------------------------- Have you been used by Microsoft today? Choose your life. Choose freedom. Choose LINUX. ------------------------------------------------- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php