Help Understand Escaping Quotes

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

gaspower
New php-forum User
New php-forum User
Posts: 2
Joined: Sat Dec 03, 2011 6:45 am

Help Understand Escaping Quotes

Postby gaspower » Sat Oct 20, 2012 12:07 pm

Hello,
I need some help understanding escaping quotes. I was told for the below script to work, I need to escape the quotes. Does this mean I nee to use (\) prior and after all (")?

Such as
<script type=\"text/javascript\">document.write


Code: Select all

<script type="text/javascript">document.write('<scr');document.write('ipt type="text/javascript" data-ppmnid="43423" src="//ad.where.com/jin/spotlight/ads?pubid=05693f&format=js&v=2.4&placementtype=120x240&ppmnid=43423&rand=' + Math.round(Math.random() * 100000000000000) + '">');document.write('</scr' + 'ipt>');</script>


Thank you,
JR

User avatar
simplypixie
php-forum Active User
php-forum Active User
Posts: 300
Joined: Sun Dec 11, 2011 12:51 am
Location: Shrewsbury, Shropshire
Contact:

Re: Help Understand Escaping Quotes

Postby simplypixie » Mon Oct 22, 2012 2:39 am

Yes, that is what it means


Return to “PHP coding => General”

Who is online

Users browsing this forum: Google [Bot] and 2 guests