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
What are differences between PECL and PEAR?
What is a controller php?
What are the functions for imap?
Tell me what does pear stands for?
How do I escape data before storing it in the database?
Binary tree question - Node has numeric data (int) The function takes depth as argument and sum all the value of the node of the depth. For instance, (0) depth 0 / \ 10 20 depth 1 / \ / \ 40 50 60 70 depth 2 so if you pass get_sum(2), you would return 220 which is 40+50+60+70 (sum of depth2) write the function.
What is php default argument?
What are escaping characters?
Can you define an argument as a reference type?
How do I escape in php?
Tell me how would you declare a function that receives one parameter name hello?
What is the use of strpos in php?
What new features php7 has in store for us?
What PHP stands for?
What are interfaces in php?