Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can we know the number of days between two given dates
using PHP?

Answer Posted / ash

$date1 = date('Y-m-d');
$date2 = "2007-07-05";
$days = (strtotime($date1) - strtotime($date2)) / (60 * 60
* 24);
echo " No of $days difference";

Is This Answer Correct ?    25 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the difference between abstract class and interface in oops?

962


Why do we use polymorphism in php?

981


What is the static variable in function useful for?

931


A process can run only in the background. State Whether True or False?

1089


What are variables in research examples?

1037


How to check an element is exists in array or not in php?

1037


What is difference between base_url and site_url?

979


What is mvc? Why its been used?

912


What is difference between required and require_once in php?

1039


Explain about switch statement in PHP?

980


What is difference between core php and framework?

950


How php statement is different from php script?

951


What does $_cookie means?

936


What is a class in php programing?

2526


What are the variables in php?

1009