php remove span tags code example Example: php remove span tags from string echo $new_string = preg_replace('/<span[^>]+\>/i', '', $content);