php替換p標(biāo)簽的方法:首先創(chuàng)建一個(gè)PHP示例文件;然后通過“str_replace(array("<p>","","</p>"),"",$html);”方法替換p標(biāo)簽即可。
推薦:《PHP視頻教程》
代碼示例如下:
$html="<p>fdasf</p>"; echo $string = str_replace(array("<p>","","</p>"),"",$html);
php替換p標(biāo)簽的方法:首先創(chuàng)建一個(gè)PHP示例文件;然后通過“str_replace(array("<p>","","</p>"),"",$html);”方法替換p標(biāo)簽即可。
推薦:《PHP視頻教程》
代碼示例如下:
$html="<p>fdasf</p>"; echo $string = str_replace(array("<p>","","</p>"),"",$html);