0
我有一個RSS提要,我試圖通過SimplePie提取數據(在WordPress中)。從SimplePie中提取特定數據get_content對象
我必須提取內容標籤。它適用於<?php echo $item->get_content(); ?>
。它拋出這一切的東西(當然這只是一個入口,其他具有相同的結構):
<table><tr valign="top">
<td width="67">
<a href="http://www.anobii.com/books/Lapproccio_sistemico_al_governo_dellimpresa/9788813230944/014c5c45a7ddaab1ec/" style="border: 1px solid #333333">
<img src="http://image.anobii.com/anobi/image_book.php?type=3&item_id=014c5c45a7ddaab1ec&time=0">
</a>
</td><td style="margin-left: 10px;padding-left: 10px">[person name] put "[title]" onto shelf<br/></td></tr></table>
雖然我需要的只是裏面的src =「」標籤(圖像URL)的內容。我怎樣才能提取只?
所以我應該打印$用品 - > get_content();首先在一些文件上? – MultiformeIngegno
@MultiformeIngegno:不,只需用'$ item-> get_content()替換'$ html'' –
就像一個魅力! :D – MultiformeIngegno