I have this code and it works great
$i = 0; // counter
$url = "http://www.banki.ru/xml/news.rss"; // example url to parse
$rss = simplexml_load_file($url); // XML parser
print '<h2><img style="vertical-align: middle;" src="'.$rss->channel->image->url.'" /> '.$rss->channel->title.'</h2>'; // channel title + img with src
foreach($rss->channel->item as $item) {
if ($i < 1) { // parse only 1 item
print '<a href="'.$item->link.'">'.$item->title.'</a><br />';
}
$i++;
}
But I would like to show only second item from this feed. How I can do this?