How to get the content in & lt; td & gt? & Lt; table & nbsp; & gt; & lt; tr & gt; & lt; td & nbsp; & gt; & lt; a & nbsp; nameto133 & nbsp; & gt; trademark name & lt; a & gt; & l how to getContent in?
Trademark Name |
Shang Shancai |
Registration No./Application No. |
9326603 |
International Classification |
14 |
Application date |
|
How to GetThank you for posting the source code !!!!!
------ Solution --------------------
This post was last edited by xuzuning on 10:53:31
$ S = <HTML
Trademark Name |
Shang Shancai |
Registration No./Application No. |
9326603 |
International Classification |
14 |
Application date |
|
HTML;
Preg_match_all ('# <(td) [^>] *> (. +)
Print_r ($ r [2]);
Array
(
[0] => trademark name
[1] =>Shang Shancai
[2] => Registration No./Application No.
[3] = & gt; 9326603
[4] => International Classification
[5] => 14
[6] => application date
[7] => 2011/4/12
)
------ Solution --------------------
Reference:
Thank you very much. It would be better to remove the html tag at the same time, as shown in figure
In an array loop, use strip_tags ()