douba9654 2016-09-03 00:32
浏览 21
已采纳

如何在回声中设置两个'(撇号)

I have this code :

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

The character after echo and character in background url address can't be together I forgot how can solve this?

and when I use :

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

Style doesn’t work properly.

Can you help me?

  • 写回答

1条回答 默认 最新

  • dth96108 2016-09-03 00:36
    关注

    Using double quotes instead of single quotes for the string allows you to use single quote inside it:

    echo "string with 'quotes' inside";
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?