ok i got it too work but it is only pulling the first 4 why would that be
// search for date and replace comments
preg_match_all("/<!--\s?BEGIN date\s?-->(.+)<!--\s?END date\s?-->/i",$data, $printdate);
$date = preg_replace("/<!--\s?BEGIN date\s?-->(.+)<!--\s?END date\s?-->/i","<pubdate>$1</pubdate>\n",$printdate[0]);
foreach($date as $key => $output)
{
echo $output;
echo"<br>";
}