How can we know the number of days between two given dates
using PHP?
Answer Posted / dheeraj
<?php
$date1=date('Y-m-d');
$date2="2007-09-15";
echo (round($diff=strtotime($date1)-strtotime($date2)))/86400;
?>
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is repository in php?
What is xss and csrf?
How can I embed a java program in php file and what changes have to be done in php.ini file?
When a conditional statement is ended with an endif?
how to track no of users logged in?
What is the use of namespace in php?
Can we extend multiple classes in php?
What is a model in php?
Can I use node js with php?
What is reference variable php?
What is a PHP Filter?
What do you mean by core php?
How many types of array supported in php?
How to get length of an array in PHP?
What is difference between php and html?