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

How does php work?

957


Define soundex()?

930


How to turn on the session support in php?

961


How to read the entire file into a single string?

989


What is mean tnq

1522


What does $_env mean?

988


Tell me how can I display text with a php script?

963


Where php language is used?

976


What are the 3 scope levels available in php and how would you define them?

960


What is $_session in php?

994


What are the special characters you need to escape in double-quoted stings?

1070


What is polymorphism in php?

981


Do csrf tokens expire?

968


What is php and sql used for?

986


How do I start a php session?

981