Current File : /home/inlingua/www/noida/icentex/general_leave/noofdays_ajax.php
<?php
$fromdate=$_GET['fromdate'];
$todate= $_GET['todate'];

$fromDate = $fromdate;
$toDate = $todate;

$dateMonthYearArr = array();
$fromDateTS = strtotime($fromDate);
$toDateTS = strtotime($toDate);

for ($currentDateTS = $fromDateTS; $currentDateTS <= $toDateTS; $currentDateTS += (60 * 60 * 24)) {
// use date() and $currentDateTS to format the dates in between
$currentDateStr = date("Y-m-d",$currentDateTS);
$dateMonthYearArr[] = $currentDateStr;
//print $currentDateStr.�<br />�;
}

echo count($dateMonthYearArr);
?>