I have a script that is parsing rss feeds and the xml to a webpage, this is part of a blog aggregator system. However there are areas throughout the web system where I would like to only display a set number of posts, 10 for example

I have tried a number of techniques and currently they either do nothing or prevent any data being displayed.

This is the current piece of code that is using the foreach loop and displaying the data, using this method however makes no data at all appear

foreach ( $feeds->data as $item ) {
extract( (array) $item );
if($count  >= 10){
?>
<div id="post"><p class="title"><a href="<?php echo $link; ?>"><?php echo $title; ?></a></p>
<p class="date"><?php echo $pubDate; ?></p>
<p class="extract"><?php echo $description; ?></p></div>
<? }
else {
	break;
}
}
?>

any help would be greatly appreciated.

correct it straight after I posted this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.