<?php function no_img($txt) { $txt = preg_replace('|<img src(.*?)>|', '', $txt); return $txt; } ob_start(no_img); echo '<img src="http://visavi.net/images/img/logo_small.png" alt="image" /> <a href"=http://visavi.net">visavi.net</a>'; ob_end_flush(); ?>