Russ, that's great! Thanks for the help!
Dave
On 2/18/07, Russ Johnston <russ staceyshouse.com>
wrote:
> The problem is that you sliced the array, but then you
used the original
> array instead of the slice.
> change this:
> foreach ($rss->items as $item) {
> to this:
> foreach ($items as $item) {
>
> Russ
>
>
> On 2/18/07, Dave Briggs <briggs.dave gmail.com> wrote:
> >
> > Hi everyone
> >
> > Have got Magpie up and running at
> > http:/
/lgsearch.net/rss/scripts/searchplus.php - however,
> you'll see
> > that one of the feeds is huge and I need to slice
them all at 10, or
> > even 5. But when I copy the code in to do so, it
doesn't do anything!
> >
> > Here's how my code appears:
> >
> >
> > $rss = fetch_rss( 'feedurl' );
> >
> > $items = array_slice($rss->items, 0, 10);
> > echo $rss->channel['title'] .
"<p>";
> > echo "<ul>";
> > foreach ($rss->items as $item) {
> > $href = $item['link'];
> > $title = $item['title'];
> > echo "<li><a
href=$href>$title</a></li>";
> >
> > I think I have the slice code in the right
place... Any ideas on
> > what's going wrong?
> >
> > Thanks in advance!
> >
> > --
> > Dave Briggs
> >
> >
>
------------------------------------------------------------
-------------
> > Take Surveys. Earn Cash. Influence the Future of
IT
> > Join SourceForge.net's Techsay panel and you'll
get the chance to share
> your
> > opinions on IT & business topics through brief
surveys-and earn cash
> >
> http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Magpierss-general mailing list
> > Magpierss-general lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/magpi
erss-general
> >
>
>
--
Dave Briggs
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Magpierss-general mailing list
Magpierss-general lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/magpi
erss-general
|