Scroll to top

How to count number of days in between two dates in php?


Notice: Undefined variable: string in /home/u665484253/domains/wpcodekit.com/public_html/wp-content/themes/twentytwenty-child/functions.php on line 61

How to count number of days in between two dates in php?

 

<?php
$date1 = date_create(“2017-04-15”);$date2 = date_create(“2017-05-18”);
//difference between two dates$diff = date_diff($date1,$date2);
//count daysecho ‘Days Count – ‘.$diff->format(“%a”);?>

 

Get more information

Read More Posts

Leave a Reply

Your email address will not be published.