adspace
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 trait in php?
What is difference between static and final in php?
How to create a web form?
if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer
What does $_files means?
Tell me what kind of things have you done on the social side?
sort term descripttion form, report and uery
What is the difference between htmlentities() and htmlspecialchars()?
How to calculate the difference between two dates using php?
What sized websites have you worked on in the past?
Write a program using while loop?
Name and explain five of the PHP error constants?
What is the current stable version of php? What advance thing in php7?
Which variable declarations within a class is invalid in php?
how to detect a mobile device using php