How to deal with this HTML code echoed with PHP which as both single and double quotes?

前端 未结 6 1297
鱼传尺愫
鱼传尺愫 2021-01-16 15:57

I\'m not sure if this is a cleaner way of writing this, but I think I don\'t have problems here:



        
6条回答
  •  悲&欢浪女
    2021-01-16 16:51

    echo 'String with "double quotes" inside';
    echo "String with \"double quotes\" inside";
    echo 'String with \'single quotes\' inside';
    echo "String with 'single quotes' inside";
    echo 'String with \'single quotes\' and "double quotes" inside';
    echo "String with 'single quotes' and \"double quotes\" inside";
    

提交回复
热议问题