if I have this:
$strVar = "8:00 pm EST Our guest for May 9th will be Joe Carriker of Sword & Sorcery/Scarred Lands"; $temp = str_replace("\\\&","and",$strVar);
why isn't the amprisand replaced and how can I fix this?
I guess, & is not sooo special 😃
just don't escape it, and/or use single quotes
The ampersand isn't a character that needs to be escaped in PHP... are you a Perl programmer? :-)
Try:
$strVar = "8:00 pm EST Our guest for May 9th will be Joe Carriker of Sword & Sorcery/Scarred Lands";
$temp = str_replace("&","and",$strVar);