How to replace the p tag with php: First create a PHP sample file; then pass "str_replace(array("","","
"),"",$html); " method to replace the p tag.
Recommended: "PHP Video Tutorial"
The code example is as follows:
$html="<p>fdasf</p>"; echo $string = str_replace(array("<p>","","</p>"),"",$html);
The above is the detailed content of How to replace p tag in php. For more information, please follow other related articles on the PHP Chinese website!