0

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.

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by lit108
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.