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 are the advantages of indexes?
What is a persistent cookie in php?
What is the use of $_request variable?
What are the ways to include file in php?
What is php string function?
How do you pass a variable by value?
Which of the delimiter is ASP style?
Do you know is it possible to extend the execution time of a php script?
What is the difference between == and === in php?
How stop the execution of a php scrip?
Is wordpress a php framework?
Name and explain five of the PHP error constants?
What are the different ways to login to a remote server? Explain the me, advantages and disadvantages?
What is the use of super-global arrays in php?
What is design pattern? Explain all including singleton pattern?