Hey,
Is it possible to have more than one RSS feed on my website. Because when i try putting 2 of this code in, it only shows the first RSS FEED
Code:
[INDENT]<?
require('magpierss-0.71.1/rss_fetch.inc');
$rss = fetch_rss('http://nyhederne.tv2.dk/rss/nyhederne.xml');
$num_items = 5;
$items = array_slice($rss->items, 0, $num_items);
foreach ($items as $item) {
$title = $item['title'];
$href = $item['link'];
$description = str_replace('','',$item['description']);
echo "<li><a href=$href>$title</a>".$item['description']."</li>"
;
}
?> [/INDENT]
The SECOND code i put in is this
Code:
[INDENT]<?
require('magpierss-0.71.1/rss_fetch.inc');
$rss = fetch_rss('http://www.dr.dk/Forms/Published/rssNewsFeed.aspx?config=4cdd8bff-48a5-461c-a848-f553db411d4c&rss=Yes&rssTitle=DR+Nyheder+Online+-+Alle+nyheder&overskrift=Alle+nyheder+-+24+timer&Url=%2fnyheder%2f');
$num_items = 5;
$items = array_slice($rss->items, 0, $num_items);
foreach ($items as $item) {
$title = $item['title'];
$href = $item['link'];
$description = str_replace('','',$item['description']);
echo "<li><a href=$href>$title</a>".$item['description']."</li>"
;
}
?> [/INDENT]
But it only shows the first RSS feed.
How can i show both?
/Sebastian