NYCPHP Meetup

NYPHP.org

[nycphp-talk] Can code be executed in a heredoc?

Adam Maccabee Trachtenberg adam at trachtenberg.com
Tue Feb 17 23:58:48 EST 2004


On Tue, 17 Feb 2004, Daniel J Cain Jr. wrote:

> Is it bad form to use the format below?  Instead of escaping all double
> quotes to use single quotes for the tag attributes.
>
> echo "<a href='http://www.nyphp.org'>Link Test</a>";

While that is technically legal HTML, until someone can prove it to me
otherwise, I've never trusted that some stupid browser won't barf on
it.

For XML, I'm willing to do this, since I usually have control over the
parser and I'm willing to trust (for some reason) that XML parsers get
this right.

-adam

-- 
adam at trachtenberg.com
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!



More information about the talk mailing list