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?
How can we know the number of days between two given dates
using MySQL?

Answer Posted / indira majumder

<?php
$date1 = date('y-m-d');
$date2 = '2007-12-7';
$days = (strtotime($date2)-strtotime($date1))/(60*60*24);
echo "Number of Days since '2007-12-7': $days";

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of indexes?

867


What is a persistent cookie in php?

919


What is the use of $_request variable?

964


What are the ways to include file in php?

948


What is php string function?

945


How do you pass a variable by value?

992


Which of the delimiter is ASP style?

1035


Do you know is it possible to extend the execution time of a php script?

983


What is the difference between == and === in php?

968


How stop the execution of a php scrip?

969


Is wordpress a php framework?

1024


Name and explain five of the PHP error constants?

894


What are the different ways to login to a remote server? Explain the me, advantages and disadvantages?

1003


What is the use of super-global arrays in php?

899


What is design pattern? Explain all including singleton pattern?

937