PHP : Using single quotes and double quotes in single string
<p>How can i use string like below code.</p>

<pre><code>$str = 'Is yo"ur name O'reil"ly?';
</code></pre>

<p>The above code is just an example..I need to use big html template which contains single and double quotes.I tried <strong>Addslashes</strong> php method but when i use single and double quote string in that function i get syntax error.Please help me.</p>

<p>Note : my realtime usage is json data like below.</p>

<pre><code>    $string = "

    &lt;html&gt;
    ...
    &lt;b:if cond='data:blog.pageType == "item"'&gt;
    ..

    ";
   $string = '{"method":"template","params":{"1":"'.$string.'"},"token":"12345"}';
</code></pre>
