calculating number of nights from two dates

0 Ricky Nkansah · January 12, 2015
Please can someone help on how to calculate the number of nights using php

Post a Reply

Replies

Oldest  Newest  Rating
0 Ricky Nkansah · January 12, 2015
I have figure it out

In case anyone wants it.

$old_date = strtotime("2015-01-01"); 
$your_date = strtotime("2015-03-01"); 
$difference = $old_date - $your_date; 

echo floor($difference/(60*60*24)); 





Thanks to samuel oloruntoba for the help
  • 1

PHP

107,055 followers
About

Server-side, HTML embedded scripting language used to create dynamic Web pages.

Links
Moderators