NYCPHP Meetup

NYPHP.org

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

bpang at bpang.com bpang at bpang.com
Wed Feb 18 00:36:48 EST 2004


I think it's acceptable... or at least it does work.
but when you encounter an img alt tag with an apostrophe you will have to
escape that...

echo "<img src='image.png' alt='brian\'s image'>";




> 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>";
>
> On Tue, 2004-02-17 at 22:28, wrote:
>> not having to escape all your quotes in echos?
>>
>> echo "<a href=\"http://www.nyphp.org\">Link text</a>";
>>
>>
>> > Aside from personal preference, is there a compelling reason to kick
>> > back out to HTML, as Hans suggests?
>>
>> _______________________________________________
>> talk mailing list
>> talk at lists.nyphp.org
>> http://lists.nyphp.org/mailman/listinfo/talk
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>




More information about the talk mailing list