How can we know the number of days between two given dates
using PHP?
Answer Posted / ash
$date1 = date('Y-m-d');
$date2 = "2007-07-05";
$days = (strtotime($date1) - strtotime($date2)) / (60 * 60
* 24);
echo " No of $days difference";
| Is This Answer Correct ? | 25 Yes | 4 No |
Post New Answer View All Answers
What are the difference between abstract class and interface in oops?
Why do we use polymorphism in php?
What is the static variable in function useful for?
A process can run only in the background. State Whether True or False?
What are variables in research examples?
How to check an element is exists in array or not in php?
What is difference between base_url and site_url?
What is mvc? Why its been used?
What is difference between required and require_once in php?
Explain about switch statement in PHP?
What is difference between core php and framework?
How php statement is different from php script?
What does $_cookie means?
What is a class in php programing?
What are the variables in php?