connection); $posts = new table('posts',$db->connection); $comments = new table('comments',$db->connection); // grab links $feed_links = $links->getRowsSQL('1 order by link_date DESC'); // grab posts. $posts_display = $posts->getRowsSQL(" status='published' ORDER By created DESC"); $latest = array(); $latest_date = array(); foreach ($feed_links as $l) { $latest[] = array('type'=>'link','data'=>$l); $latest_date[] = strtotime($l['link_date']); } foreach ($posts_display as $l) { $latest[] = array('type'=>'post','data'=>$l); $latest_date[] = strtotime($l['created']); } // sort all the items by date. array_multisort($latest_date, SORT_NUMERIC, SORT_DESC, $latest); // content-type header('Content-type: application/rss+xml'); // document start echo ''; /* echo ''; */ ?> http://sjparsons.com sam parsons thoughts form around the world en-us {$item['data']['link_title']} {$item['data']['link_url']} link]]> ".date('D, d M Y H:i:s T',strtotime($item['data']['link_date']))." {$item['data']['link_url']} "; } else if ($item['type'] == 'post'){ echo " {$item['data']['title']} http://sjparsons.com/posts/{$item['data']['permalink']} ".date('D, d M Y H:i:s T',strtotime($item['data']['created']))." http://sjparsons.com/posts/{$item['data']['permalink']} "; } } ?>