如题所述
<?php
$str = '<p class=indent>要提取的内容</p>';
$preg = "/<p.*>(.*)<\/p>/";//正则
preg_match($preg,$str,$num);
echo $num[1];追问
$str = '<p class=indent>要提取的内容</p>';
$preg = "/<p.*>(.*)<\/p>/";//正则
preg_match($preg,$str,$num);
echo $num[1];追问
谢谢你的回答我已经解决了/(.*)/isU
温馨提示:答案为网友推荐,仅供参考