Mohammad Mohammad - 6 months ago 25
PHP Question

How can set two ' (apostrophe) together in echo

I have this code :

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

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?


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

echo "string with 'quotes' inside";