How can I avoid double quotes from a string in php?

I tried to solve it, but no luck. This is my code.

$replace1 =str_replace('hreflang=\"'.$arr['variantslang1hid'].'\" lang=\"'.$arr['variantslang1hid'].'\"','hreflang=\"'.$arr['variantslang1'].'\" lang=\"'.$arr['variantslang1'].'\"',$replace1); 

He should replace, but no. I do not run away correctly. How can i solve this? Help rate!

0
string php escaping double-quotes
Feb 22 2018-12-22T00:
source share
1 answer

If you use single quotes, you do not need to avoid double quotes, "" is what you want.

+2
Feb 22 2018-12-12T00:
source share



All Articles