Help Understand Escaping Quotes

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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

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="//' + Math.round(Math.random() * 100000000000000) + '">');document.write('</scr' + 'ipt>');</script>

Thank you,

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

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: Yahoo [Bot] and 6 guests