Escaping quotation marks in PHP

后端 未结 7 2158
醉梦人生
醉梦人生 2020-11-21 23:49

I am getting a parse error, and I think it\'s because of the quotation marks over \"time\". How can I make it treat it as a whole string?



        
7条回答
  •  不思量自难忘°
    2020-11-22 00:30

    Either escape the quote:

    $text1= "From time to \"time\"";
    

    or use single quotes to denote your string:

    $text1= 'From time to "time"';
    

提交回复
热议问题