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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]