I've been trying to solve this but no luck. This is my code.
$replace1 =str_replace('hreflang=\"'.$arr['variantslang1hid'].'\" lang=\"'.$arr['variantslang1hid'].'\"','hreflang=\"'.$arr['variantslang1'].'\" lang=\"'.$arr['variantslang1'].'\"',$replace1);
It should replace but no. I'm not escaping "" properly. How can i solve this? Help much appreciated!