How can we know the number of days between two given dates
using PHP?
Answer Posted / savvy
"The function expects to be given a string containing a US
English date format and will try to parse that format into a
Unix timestamp (the number of seconds since January 1 1970
00:00:00 GMT), relative to the timestamp given in now, or
the current time if none is supplied." --- in php.net So Be
careful when calculating with strtotime(). Therefore in the
above ans it might be like this way
$date1 = date('M-d-Y');
$date2 = "August-07-2007";
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
What is active record in php?
List some sorting functions in php?
How many types of array supported in php?
Explain me differences between get and post methods?
What is trim codeigniter?
What are properties in php?
Are sessions stateless?
What is the difference between die () and exit () in php?
How do I run a php program in dreamweaver?
How to redirect https to http url through .htaccess?
How to get elements in reverse order of an array in php?
What happens when submit button is clicked?
What is crypt () in php?
What is php string function?
What is a http session?