Hi I am looking to replace words in an html email I am loading via file_get_contents
Here is my code:
$message = file_get_content
$message = str_replace("$SAD", "HAPPY", $message);
needs to be:
$message = str_replace('$SAD', "HAPPY", $message);
Otherwise PHP will interpret it as the variable $SAD. See this post for an explanation on the difference between single and double quotes.
$SAD