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

What are the new features in php 7?

0 Answers  


Why do we use javascript in php?

0 Answers  


What is if isset ($_ post submit )) in php?

0 Answers  


How to take a substring from a given string?

0 Answers  


What is php beginner?

0 Answers  






Why do you need php?

0 Answers  


How is traits used in php?

0 Answers  


What is the Pipe Symbol represented?

0 Answers  


Does php support multiple inheritance?

0 Answers  


1. Write a function to swap two values ? $a = 10; $b = 20; echo $a, $b; swap(); // If u want u can pass parameters echo $a, $b; // It should print 20 , 10

14 Answers   Aquasol, Infosys, TCS, Torque Infotech,


What is difference between strstr() and stristr() in PHP?

0 Answers  


How do you use an array in excel?

0 Answers  


Categories