blake87 Posted August 18, 2008 Share Posted August 18, 2008 When I use the str_replace function, I can remove most of the desired strings within the text but when I attempt to remove an image containing specific words, it is not removed can anyone help me with this example $words =array("<img src=\"http://image"); $introtext =str_replace($words,"",$introtext); Thanks in advance I hope theres a simple solution Link to comment https://forums.phpfreaks.com/topic/120177-removing-an-image-with-str_replace/ Share on other sites More sharing options...
Mchl Posted August 18, 2008 Share Posted August 18, 2008 Wouldn't strip_tags() work better? Link to comment https://forums.phpfreaks.com/topic/120177-removing-an-image-with-str_replace/#findComment-619095 Share on other sites More sharing options...
blake87 Posted August 18, 2008 Author Share Posted August 18, 2008 I have already used that function, but not for removing images since I dont want to remove all images just one particular image , thanks for the reply Link to comment https://forums.phpfreaks.com/topic/120177-removing-an-image-with-str_replace/#findComment-619097 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.