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 polymorphism?
What is the difference between fopen() and fclose()?
Can we use session in mvc?
What is encapsulation in oop php?
What does it mean when it says the csrf token is invalid?
What are examples of independent and dependent variables?
What are the Advantages and Application Areas of PHP?
What is the correct line to use within the php.ini file, to specify that 128mb would be the maximum amount of memory that a script may use?
Tell me whether it is possible to share a single instance of a memcache between multiple php projects?
how retrive the video file in php using video tag
How to remove the new line character from the end of a text line?
/temp is a type of filesystem directory. State Whether True or False?
Is php a dying language?
Tell me which function gives us the number of affected entries by a query?
What is difference Between PHP 5 and 7?