开发者

Category results by time of publish?

I'm using simplepie with codeigniter to fetch lots of feeds from multiple sites. I want to category all results by time of publish.. Such as published in 5 minutes, 15 minut开发者_JS百科es, 30 minutes, 1 hours, 2 hours etc.. in same page!

Any idea how to do this?

Should I do for all those times own query and push those to view page or should I do it in view page inside foreach?

Code examples are very welcome as well! :)

Thanks!


I would build a model for getting the feeds with simple pie. I would even categorize them in the model. I would call the appropriate model function inside my controller and pass the data return bu that method to the view for displaying.

The only complex part is of course the model.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜