post icon

php difference between two dates

<?php
$startDate =”1-1-2011″;
$endDate = “2-2-2011”;
$days = (strtotime($endDate) – strtotime($startDate)) / (60 * 60 * 24);
print $days;
?>

Comments are closed.

Leave a comment