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 the use of addslashes in php?
Is php 7.0 stable?
How do you measure variables?
can you give me an example code of calling java script function in php variable using AJAX.or with out ajax??????
Explain what is the difference between session and cookie?
How can php and javascript interact?
Why laravel is the best php framework in 2019?
What is the use of final class in php?
What is the difference between file_get_contents() and file_put_contents() in php?
How to read a file in php?
Tell me what types of loops exist in php?
Which array function checks if the particular key exists in the array?
Do you know what is the function func_num_args() used for?
What is split function in php?
Why is php used for web development?