how to remove p tag from string in php code example
Example 1: php remove span tags from string
echo $new_string = preg_replace('/<span[^>]+\>/i', '', $content);
Example 2: remove html from string php
echo strip_tags("Hello <b>world!</b>");
echo $new_string = preg_replace('/<span[^>]+\>/i', '', $content);
echo strip_tags("Hello <b>world!</b>");