<?php
//convert timestamp to normal date
$test=array(1316427274,1289909504);
foreach($test as $sort)
{
$date =str_replace(" ","_",date("Y F",$sort));
$date1 .= $date.",";
}
$date1 = substr($date1,0,-1);
$tet = explode(",",$date1);
$i = count($tet);
echo $i;
print_r($tet);
?>