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
?>

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>