I have having a hard time with this problem and anything that I try seems not to work. This is the code that I am working with
if (strpos($content,'{blog:blogtitle}') !== false) {
echo 'true';
}
echo $blogname;
if($blogname != ""){
$replaced_content = str_replace('{blog:blogtitle}', $blogname, $content);
}else{
$replaced_content = str_replace("{blog:blogtitle}", '', $content);
}
I get the true and the $blogname to echo, but for the life of me it will not replace. not even preg_replace works.