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 is the use of addslashes in php?

953


Is php 7.0 stable?

937


How do you measure variables?

1062


can you give me an example code of calling java script function in php variable using AJAX.or with out ajax??????

1889


Explain what is the difference between session and cookie?

1063


How can php and javascript interact?

1302


Why laravel is the best php framework in 2019?

963


What is the use of final class in php?

947


What is the difference between file_get_contents() and file_put_contents() in php?

1188


How to read a file in php?

975


Tell me what types of loops exist in php?

1140


Which array function checks if the particular key exists in the array?

914


Do you know what is the function func_num_args() used for?

1034


What is split function in php?

977


Why is php used for web development?

981