SyntaxFix
Write A Post
Hire A Developer
Questions
You need to assign the result back to $content as preg_replace does not modify the original string.
$content
preg_replace
$content = preg_replace("/<img[^>]+\>/i", "(image) ", $content);