Page 1 of 1

Merge RSS feed with mySQL query

Posted: Thu Jan 13, 2011 9:40 pm
by nwr91
Hello,

I do not have too much expericence with PHP, but i would like to implement a news feed on a website i'm developing. The thing is, the source for the news is a RSS feed and a mySQL query. I'd like to merge both sources, show the 5 most recent news, and sort them by date.

Is there any way to do this at all?

Thanks

Re: Merge RSS feed with mySQL query

Posted: Fri Jan 14, 2011 9:48 am
by Jade
One way to do it is to write one script that parses the existing RSS feed and puts it into an array. Then write another script to run your query and put those results in the same array. Finally sort your array by date and display only the top 5 indexes.