With websites such as a forums, users post all kinds of images which creates headache to administrator. But you can easily remove images tfrom a html content using PHP preg_replace and some customized regular expression code. Here is the complete code to remove image tags from a html string.
$html_content = 'This is a image remove example with php';
$html_content = preg_replace('/(<)([img])(\w+)([^>]*>)/','', $html_content);