SimplePie 1.5 is now available!

SimplePie Documentation.  Learn how to use this thing.  It's way better than going to school.

You are here: Documentation » API Reference » SimplePie » set_item_limit()

set_item_limit()

Description

class SimplePie {
	set_item_limit ( [int $limit = 0] )
}

Set the maximum number of items to return per feed with Multifeeds. This is NOT for limiting the number of items to loop through in a single feed. For that, you want to pass $start and $length parameters to get_items()

Availability

  • Available since SimplePie 1.1.

Parameters

limit

The maximum number of items.

Examples

Set the max number of items per feed to return with Multifeeds

$feed = new SimplePie();
$feed->set_feed_url(array('http://simplepie.org/blog/feed/', 'http://images.apple.com/main/rss/hotnews/hotnews.rss'));
$feed->set_item_limit(5);
$feed->init();
$feed->handle_content_type();
echo $feed->get_title();

See Also


reference/simplepie/set_item_limit.txt · Last modified: 2011/03/06 03:56 (external edit)