Re: Auto-generating HTML
| From: | Simcha Younger | Date: | Tue, 21 Sep 2010 07:32:40 +0000 |
| Subject: | Re: Auto-generating HTML | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-308231@lists.php.net to get a copy of this message | ||
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@gmail.com>