How can I use the string as shown below.
$str = 'Is yo"ur name O'reil"ly?';
The above code is just an example. I need to use a large html template that contains single and double quotes. I tried the Addslashes php method, but when I use one and two quotes in this function, I get a syntax error. Please help me.
Note: my real-time use is json data as below.
$string = " <html> ... <b:if cond='data:blog.pageType == "item"'> .. "; $string = '{"method":"template","params":{"1":"'.$string.'"},"token":"12345"}';
source share