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
Explain what are psrs?
Which is a perfect example of runtime polymorphism?
What is difference between mysql_connect and mysqli_connect?
What is html used for?
What are the main error types in php and how do they differ?
What is difference between get and post in php?
What is php beginner?
What is helper library?
What is $_ get and $_ post in php?
How to access a specific character in a string?
What is php routing?
Explain php parameterized functions.
Does php support multiple inheritances?
Can I use php in visual studio?
What are sql functions?