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
How does php work?
Define soundex()?
How to turn on the session support in php?
How to read the entire file into a single string?
What is mean tnq
What does $_env mean?
Tell me how can I display text with a php script?
Where php language is used?
What are the 3 scope levels available in php and how would you define them?
What is $_session in php?
What are the special characters you need to escape in double-quoted stings?
What is polymorphism in php?
Do csrf tokens expire?
What is php and sql used for?
How do I start a php session?