Having an @ inside of a string - PHP
- by Msencenb
So I know that you use a backslash to escape most things in php however the @ symbol is an operator that suppresses error messages.
I'm trying to put an email string like this inside of an array "[email protected]", however php is throwing an error.
How do you escape the @ sign?
EDIT:
Here is the code example that was throwing the error:
$arr = array(3=> "[email protected]",4=> "[email protected]");
However replacing the double quotes with single quotes fixes the error as answered below.... why is that true?