Display Simplepie RSS Feed In Reverse Order
11:45 pm on February 28th, 2010 | Hits: 334
Posted in Tips & Tricks


Faced problem to display RSS Feed items in reverse order using the Simplepie script. The solution provided in the Simplepie documentation is disable the order of the item by date.

Solution in the documentation requires us to use the following code along with your script.

$feed->enable_order_by_date(false);

This did not seem to work for me. So the only solution i had was to use the PHP reverse function instead. So to those who wish to display your Simplepie feed in reverse order, you may use the following code where needed.

<?php foreach (array_reverse($feed->get_items()) as $item): ?>

Replace the code as needed and your feed should be in reversed order.





Related Posts

SimplePie and mySQL Special Character Issue - Posted @ 2:25 pm on July 4th, 2008
Create Twitter RSS Of Your Tweets Based On Keywords - Posted @ 12:53 pm on October 23rd, 2009
Better and Enhanced Blippr RSS Feed - Posted @ 7:55 pm on March 21st, 2010


Recommended



Comments

Leave a comment:

Your comment :

 
About Me

I'm ramesh from Perak, Malaysia. Blogging is my hobby hence this blog is my second home to share my life, interests and etc.



Blog Menu



Recent Friends



 

page made and maintained by mesh