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)); ?>

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

Share This Post

Related Articles

© 2017 Sumit Bansal. All rights reserved. Site Admin · Entries RSS · Comments RSS
Powered by WordPress · Designed by Theme Junkie