Perhaps the first FAQ in the FAQ list can help you out?
faq434-3493
Or your way is completely valid... assuming all you care about it is the number of days.... and assuming you're passing it $date1 and $date2 in ways you know will work with strtotime.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.