Jump to content

writing the below in php


brown2005

Recommended Posts

<a href=\"#\" class=\"red_bold_none\" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://dynamicdrive.com');">Homepage</a>

I have

echo"  <a href=\"#\" class=\"red_bold_none\" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://dynamicdrive.com');">Homepage</a>";

but it doesnt work

any ideas please?
Link to comment
https://forums.phpfreaks.com/topic/35487-writing-the-below-in-php/
Share on other sites

I tend to use heredoc syntax when a fair bit of HTML is being used.  It cuts out headaches about double and single quotes.

[code]
echo<<< END
<a href="#" class="red_bold_none" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://dynamicdrive.com');">Homepage</a>
END;
[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.