How to show RSS of last 10 entries?
Moderator: General Moderators
How to show RSS of last 10 entries?
I know RSS is made out of xml. I have my news entries in a news table (news_id,news_title,news_content,news_image,news_tags) . How do I do so that when a user clicks on the rss link, an xml file with the 10 latest entries desc appears?
Re: How to show RSS of last 10 entries?
Getting the latest 10 results is easy -
Then you just need to echo them out in the right format for an RSS feed.
Code: Select all
SELECT * FROM `news` ORDER BY `publish_date` DESC LIMIT 10