On Tue, Sep 21, 2010 at 3:32 AM, Simcha Younger <simcha.younger@xxxxxxxxx> wrote: > On Sep 20, 2010, at 2:56 PM, Andy McKenzie wrote: > > >> Hey folks, >> >> Here's the problem. I'm writing a lot of pages, and I hate going in >> and out of PHP. At the same time, I want my HTML to be legible. When >> you look at it, that's kind of a problem, though... for instance >> (assume this had some PHP in the middle, and there was actually a >> reason not to just put this in HTML in the first place): > > Unless you are looking at the HTML alot, you can just paste the source into an editor which can auto-format the code, or look at the code in firebug (that is the usual place where I look at my HTML.) > > If there is a specific place you want to look at in the html, just change the lines there to look like this: > echo '<html> > '; > but this will make your PHP quite messy if you do it alot. > > I would go with templating, as many here suggested. > > -- > Simcha Younger <simcha.younger@xxxxxxxxx> > That's actually why this came up -- for the first time I AM looking at the generated HTML a lot. I'm building a frontend for a set of DBs we use (for various reasons none of the pre-built ones I could find would work for us), and I'm spending a fair amount of time trying to figure out whether I messed up the code, or the output just doesn't display as I expected. I've never done anything quite this complex, and have therefore never needed to look at the output html a lot. I've also just gotten tired of having my output completely unreadable... I'd like to have this project done right, and to me that means the source and the output should both be reasonably easy to parse, in addition to other things (paying a lot more attention to security than I usually do, for instance...). -Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php