Код: Выделить всё
M d[,d...] YКод: Выделить всё
Oct 10,12,24 2012
Dec 12,20,24 2012
Jan 02,10,25 2013
Код: Выделить всё
$CruiseDetailsSailingКод: Выделить всё
Array ( [0] => 10/03/2012 [1] => 10/10/2012 [2] => 10/17/2012 )Код: Выделить всё
if (count($CruiseDetailsSailing) > 0) {
$date = array();
$month = array();
$Year = array();
for ($n = 0; $n < count($CruiseDetailsSailing); $n++) {
if ($CruiseDetailsSailing[$n] != "") {
$date[] = date('Y-m-d', strtotime($CruiseDetailsSailing[$n]));
}
}
}
sort($date);
if (count($date) > 0) {
$temp = "";
$yeartemp = "";
for ($p = 0; $p < count($date); $p++) {
$month = date("M", strtotime($date[$p]));
$day = date("d", strtotime($date[$p]));
$year = date("Y", strtotime($date[$p]));
if ($month != $temp) {
$temp = $month;
?>