I am using simplepie to get some feeds, I have set the key in the array which I am having trouble accessing. Here's my code:
$feed->set_feed_url(array(
'Title One'=>'http://example.com/rss/index.xml',
'Title Two'=>'http://feeds.example.com/rss/example',
'Title Three'=>'http://feeds.example.com/ex/blog'
));
When I loop over and try to access it I'm getting errors, here's how I am trying to access it.
foreach ($feed->get_items() as $item):
echo $item[0];
Fatal error: Cannot use object of type SimplePie_Item as array
How can I access those I tried also:
echo $item->[0];
without luck.
print_r($feed)and post the output.