Hi if you are using php version 5.3 or greater then some functions are really very quick to write and use.
In this blog I am calculating the days between your given two dates.
This is by far the most accurate way of calculating the difference:
This is really a quick and easy method than we have to user earlier
for ex $data1 is you first date and @date2 is second
$date1 = new DateTime("2015-07-07");
$date2 = new DateTime("2014-07-09");
$date_difference = $date2->diff($date1)->format("%a");
and you can see by writing
echo $date_difference;
0 Comment(s)