Re: HTML and PHP?
| From: | Brian Clark | Date: | Sat, 14 Apr 2001 19:02:46 +0000 |
| Subject: | Re: HTML and PHP? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-48579@lists.php.net to get a copy of this message | ||
Hi Les,
@ 2:09:01 PM on 4/14/2001, Les Neste wrote:
> I think the echo approach is pretty handy if you want a subroutine
> to spit out a common chunk of HTML which is less than an entire
> page. And the here-doc marker lets you just paste existing HTML in
> place without having to escape all the quotation marks. To me, this
> is a Good Thing.
And you can do the exact same thing with what I posted.
<?php
function foo()
{
?>
bar. didn't "example.com" ain't aren't
<?php
}
foo();
?>
Granted, one wouldn't bother when only one string needed to be
printed, but it works just fine for large amounts of HTML.
If you needed to interpolate variables, then you'd probably want to
print(), echo() or use here-doc.
-Brian
--
PGP is spoken here: 0xE4D0C7C8
Please, DO NOT carbon copy me on list replies.