i am beginner at php. I want to calculate exact total number of days between two dates using php, mysql and want to show it in html form. I tried datediff but it doesn’t works as it gives , diffrence not total number of days.
Date fm – 10-10-22;
Date to – 20-10-22;
Total Days – 11
2
Answers
add + 1 to date_diff the output will 11 be like :
php has inbuilt
DateTime
functions to get the difference. Below outputs 10 day difference.