<? $content = “this is something with an <img src=\”test.png\”/> in it.”; $content = preg_replace(“/<img[^>]+\>/i”, “(image) “, $content); echo $content; ?> The result is: this is something with an (image) in it.
Attention in classroom
<? $content = “this is something with an <img src=\”test.png\”/> in it.”; $content = preg_replace(“/<img[^>]+\>/i”, “(image) “, $content); echo $content; ?> The result is: this is something with an (image) in it.