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 is $_ request?
What are php loops?
What is encapsulation in php?
How is the comparison of objects done in php?
Explain me what is the use of header() function in php?
How do I find environment variables?
What is php programming used for?
What are the popular content management systems (cms) in php?
What is csrf mvc?
In php how can you jump in to and out of "php mode"?
What is php data type?
What are the methods useful for method overloading?
How can you pass a variable by reference?
How do I stop php artisan serve in windows?
What is PHP? Who is the father or inventor of PHP?