如何得到<td></td>中的内容?

WBOY
Release: 2016-06-23 14:00:09
Original
2168 people have browsed it



 
 

 
 
 

 
 
 

 
 
 
商标名称

尚杉彩

注册号/申请号 9326603
国际分类号 14 申请日期 2011/4/12

如何得到中的内容,感谢,能否贴出源码!!!!!


回复讨论(解决方案)

没人知道吗?????

$s =<<< HTML<table id="TMsDt" class="TMs"><tr><td class="TBdt1"><a name="TopHere" id="TopHere">商标名称</a></td> <td class="TBdt2 tdp"><p>尚杉彩</p></td> <td class="TBdt1">注册号/申请号</td> <td class="TBdt3">9326603</td> </tr> <tr> <td class="TBdt1">国际分类号</td> <td class="TBdt2">14</td> <td class="TBdt1">申请日期</td> <td class="TBdt3">2011/4/12</td> </tr> </table>HTML;preg_match_all('#<(td)[^>]*>(.+)</\1#i', $s, $r);print_r($r[2]);
Copy after login
Array(    [0] => <a name="TopHere" id="TopHere">商标名称</a>    [1] => <p>尚杉彩</p>    [2] => 注册号/申请号    [3] => 9326603    [4] => 国际分类号    [5] => 14    [6] => 申请日期    [7] => 2011/4/12)
Copy after login

非常感谢,如果同时能把html标签去掉就更好了,如

非常感谢,如果同时能把html标签去掉就更好了,如

数组循环下,对值用strip_tags()

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template