Tuesday, July 27, 2010

days difference in php

$date2 = '2010-06-20';
$date1 = '2010-06-24';
$days = (strtotime($date1) - strtotime($date2)) / (60 * 60 * 24);
echo $days;

some other ways are also there. can any one reply as a comments

No comments:

Post a Comment