Thank you for your response. I changed the single quotes to double but it still did not work.
Here is what I have done now. I use preg_match_all to find the specific area of html that I want to change, then I use the following to delete the img tag.
Unfortunately it still does not work. I tried to eliminate each piece of the img tag and that seems to do it better but then I am left with single quotes for some strange reason rather than the double quotes.