which function used to get the number of days between two
given dates in php



which function used to get the number of days between two given dates in php..

Answer / 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

More PHP Interview Questions

Can we override static method?

0 Answers  


How to get a random value from a php array?

0 Answers  


How can we determine whether a php variable is an instantiated object of a certain class?

0 Answers  


does PHP support foreign key and Rollback?yes or not.if not then why. how will you done these concept in php?

1 Answers   Avanigoradia, Primus Global,


What is the use of $_request variable?

0 Answers  


Tell me what type of operation is needed when passing values through a form or an url?

0 Answers  


Do csrf tokens expire?

0 Answers  


What is meant by session in php?

0 Answers  


Tell me how can we automatically escape incoming data?

0 Answers  


What is pdo classes?

0 Answers  


how long a default session stay in php?

8 Answers  


Is php an array?

0 Answers  


Categories