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
How to get complete current page url in php?
can we swap two different string using php for example:-- before swapping:-- 1 string :-hello friend, 2 string :-my dear, after swapping that strings will be: 1.hello dear, 2.my friend.
Does exist in php?
Where are cookies stored php?
What is php form validation?
Tell me how to create a text file in php?
Is php an api?
What is php mean?
Can a super () and this () keywords be in same constructor?
Why do we use csrf token?
Explain how to run the interactive php shell from the command line interface?
How to define a user function?
What is an operator in php?
How many days will it take to learn php?
What is a query give example?