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