Display the total number of days between two dates in PHP
To count the total number of days between two dates, use the DateTime class and compare them via diff() method with the following few lines of code $date1 = new DateTime('2020-01-01'); $date2 = new DateTime('2020-02-15'); print_r…
Read original article