How to find out the difference between two given dates – PHP

<?php
 $startDate=explode("-", "02-08-2010");
 $endDate=explode("-", "26-04-2007");
 echo gregoriantojd($startDate[1], $startDate[0], $startDate[2])
     -  gregoriantojd($endDate[1], $endDate[0], $endDate[2]);
 //1194
?>

One thought on “How to find out the difference between two given dates – PHP”

Leave a Reply

Your email address will not be published. Required fields are marked *