怎么能设置两个'(撇号)一起在回声中


How can set two ' (apostrophe) together in echo

我有这样的代码:

echo ' <style> #post_sx {background:url('../images/posts/T_P1.png') right center no-repeat;} </style>';

echo后的字符和后台url地址中的字符不能在一起,我忘了如何解决这个问题?

 echo ' <style> #post_sx {background:url("../images/posts/T_P1.png") right center no-repeat;} </style>';

样式不能正常工作。

你能帮我吗?

使用双引号代替单引号,可以在字符串内部使用单引号:

echo "string with 'quotes' inside";