php正则表达式提取td里的数据

发布时间:2022-08-24 08:50:56    发布者:文昌文城莱奥网络技术工作室    浏览次数:714

$str = '<tr align="center" bgcolor="#fff0c1"><td colspan=9>半/全场</td><tr align="center" bgcolor="#fff0c1"><td colspan=9>半/全场</td>';
$matchall = array();
preg_match_all('/\<td.+?\>(.+?)\<\/td\>/',$str,$matchall);
print_r($matchall);

https://zhidao.baidu.com/question/528818982.html?qbl=relate_question_4&word=php%20%BD%D8%C8%A1%B5%DA%D2%BB%B6%D4td