How to get number of days between two dates in PHP

By the given blow script we can find the number of days between two dates

<?php $first_date = strtotime("2010-08-01"); // or current date as well $second_date = strtotime("1988-08-01"); $datediff = $first_date - $second_date; echo floor($datediff/(60*60*24)); ?>

Bansal Sumit

To seek challenging roles and to achieve excellence in the field of Open Source Web Technology with a profound spirit of commitment and dedication.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *