The subject may be confusing, but I am sure this is easy. My mind is blank on the solution.
I have a script that returns a variable which will always include an email address.
I want to process the variable to escape the "@" sign.
Ex.
$email = "bob@bobsite.com";
I want to process the variable above so that it changes the value of $email to...
$email = "bob\@bobsite.com";
I am guessing either preg_replace or preg_match is what I am looking for, but I have been unable to figure out how to change the variable by inserting the "\" before the "@".
Any help you can give me will be appreciated.
Thanks.