How can we know the number of days between two given dates
using PHP?
How can we know the number of days between two given dates
using MySQL?
Answer Posted / indira majumder
<?php
$date1 = date('y-m-d');
$date2 = '2007-12-7';
$days = (strtotime($date2)-strtotime($date1))/(60*60*24);
echo "Number of Days since '2007-12-7': $days";
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is nginx and what is it used for?
How to get number of elements in an array?
What is zend studio for?
Which are the best start and end tags to use?
What is csrf token and how it works?
List the different types of print functions available in php?
How we can get the number of elements in an array?
What is the use of "enctype" attribute in a html form?
Which function Returns the time of sunrise for a given day / location in PHP.
What does csrf token mean?
What are the advantages of indexes?
What are the differences between mysqli_connect and mysqli_pconnect?
Why do we use htaccess
When is a conditional statement ended with endif?
Can php use gettext?