看板 [ PHP ]
討論串[請益]如何抓取html某tag中的資料
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者michaelz (michaelz)時間17年前 (2008/09/24 07:13), 編輯資訊
0
0
0
內容預覽:
如果只是單層的話. 可以試試regex. $matches = array();. preg('/<tag>(.*?)<\/tag/', $html, $matches);. print_r($matches[1]);. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 203.

推噓1(1推 0噓 1→)留言2則,0人參與, 最新作者jeromeisgood (jeromeisgood)時間17年前 (2008/09/23 11:14), 編輯資訊
0
0
0
內容預覽:
找一下dom的資料. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 122.146.5.129.

推噓0(0推 0噓 4→)留言4則,0人參與, 最新作者meccachen (禾呈)時間17年前 (2008/09/22 11:33), 編輯資訊
0
0
0
內容預覽:
例如要抓出XXX及OOO. <tag>. XXX. </tag>. .... ..... <tag>. OOO. </tag>. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 122.116.92.103.
首頁
上一頁
1
下一頁
尾頁