Display all feeds using simplexml_load() using PHP
Posted
by Jean
on Stack Overflow
See other posts from Stack Overflow
or by Jean
Published on 2010-03-29T07:32:51Z
Indexed on
2010/03/29
7:53 UTC
Read the original article
Hit count: 241
php
Hello,
I want to loop to get all feeds, but displaying only one
$url = "http://localhost/feeds/feeds.rss";
$xml = simplexml_load_file($url);
foreach($xml->item as $result){
echo $result->description."<br>";
}
RSS Feed is -
<channel>
<title>/</title>
<link>/</link>
<atom:link type="application/rss+xml" href="/" rel="self"/>
<description>/</description>
<language>/</language>
<ttl>/</ttl>
<item>
<title>/</title>
<description>/</description>
<pubDate>/</pubDate>
<guid>/</guid>
<link>/</link>
</item>
<item>
<title>/</title>
<description>/</description>
<pubDate>/</pubDate>
<guid>/</guid>
<link>/</link>
</item>
</channel>
Thanks Jean
© Stack Overflow or respective owner