SimplePie 1.3.1 is now available. Upgrade now!

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/05 19:56 (external edit)