which function used to get the number of days between two
given dates in php
Answer Posted / silambu_irtt
<?php
$days = (strtotime("2005-11-26") - strtotime("2005-11-20"))
/ (60 * 60 * 24);
print $days;
?>
This code print number of days between two dates
| Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
How to pass variables by references?
How can you execute php script from the command line?
Which Scripting Engine PHP uses?
What is strlen function in php?
What is the difference between public, protected and private?
How to remove values saved in the current session?
What is env in laravel?
Does php pass arrays by reference?
How can I convert ereg expressions to preg in php?
Difference between mysql_connect and mysql_pconnect?
What is the difference between explode and split?
What is prepare in php?
what the new feature add in php 7.2?
How to download and install php for windows?
What is difference between get and post in php?