$url) $feedslist[] = array($tag,$url); //compile all the feeds together, prefacing the titles with their feed tag foreach($feedslist as $feeditem) $feedcontents .= preg_replace('//',"<title>($feeditem[0]) ",@file_get_contents($feeditem[1])); //grab the <item>'s preg_match_all("/<item(>|\h.*>).*<\/item>/isU",$feedcontents,$xmlitems); //grab the metadata from the <item>'s foreach($xmlitems[0] as $xmlitem) { preg_match("/<title>(.*)<\/title>/isU", $xmlitem, $xmltitle); preg_match("/<.{3,3}date>(.*)<\/.{3,3}date>/isU", $xmlitem, $xmldate); $data['title'][] = substr($xmltitle[1],0,$linelength); $data['date'][] = strtotime($xmldate[1]); } //sort data array_multisort($data['date'],SORT_DESC,SORT_NUMERIC,$data['title']); //display foreach($data['title'] as $linenumber => $dataline) if($linenumber < $lines | !$lines) echo $dataline . '<br />'; ?> </body> </html>