如何使用simple_html_dom.php获取rss提要

如何使用simple_html_dom.php获取rss提要,dom,rss,simple-html-dom,Dom,Rss,Simple Html Dom,如何使用simple_html_dom.php获取rss提要(标题、链接和描述标记一起)。实际上,我已经使用simple_html_dom.php分别获取了标题、链接和描述,但我无法同时获取它们。我使用此代码分别获取了标记 foreach($html->find('title') as $element) echo $element->plaintext . '<br>'; foreach($html->find('title')作为$e

如何使用simple_html_dom.php获取rss提要(标题、链接和描述标记一起)。实际上,我已经使用simple_html_dom.php分别获取了标题、链接和描述,但我无法同时获取它们。我使用此代码分别获取了标记

    foreach($html->find('title') as $element) 
           echo $element->plaintext . '<br>';
foreach($html->find('title')作为$element)
echo$element->纯文本。“
';
但实际上我想这样做(此代码不工作,synthax错误)

foreach(($html->find('title')作为$element_1)和&$html->find('link')作为$element_2)和&$html->find('description')作为$element_3))
{
echo$element_1->纯文本。“
”; echo$element_2->纯文本。“
”; echo$element_3->纯文本。“
”; }
你知道这件事吗

谢谢你的帮助

 foreach(($html->find('title') as $element_1)&&$html->find('link') as $element_2)&&$html->find('description') as $element_3)) 
{
           echo $element_1->plaintext . '<br>';
echo $element_2->plaintext . '<br>';
echo $element_3->plaintext . '<br>';
}