Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Help Understand Escaping Quotes

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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,
New php-forum User
New php-forum User
Posts: 2
Joined: Sat Dec 03, 2011 6:45 am

Re: Help Understand Escaping Quotes

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

Yes, that is what it means
User avatar
php-forum Active User
php-forum Active User
Posts: 300
Joined: Sun Dec 11, 2011 12:51 am
Location: Shrewsbury, Shropshire

Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.