$d1=mktime(0,0,0,$Date_List_a1[1],$Date_List_a1[2],$Date_List_a1[0]);
$d2=mktime(0,0,0,$Date_List_a2[1],$Date_List_a2[2],$Date_List_a2[0]);
$Days=round(($d1-$d2)/3600/24);
return $Days;
}
echo getChaBetweenTwoDate('2010-08-11','2010-08-16');
echo "<br>";
echo getChaBetweenTwoDate('2010-08-16','2010-08-11');
?>