I want to seek a reduction in the amount of 2 days. that is today reduced to the date of before today.
for example :
$dateNow = date('Y-m-d');
$getDate = "2014-07-30";
$return = 25;
please, give me solution. thanks...
I want to seek a reduction in the amount of 2 days. that is today reduced to the date of before today.
for example :
$dateNow = date('Y-m-d');
$getDate = "2014-07-30";
$return = 25;
please, give me solution. thanks...
Try This:
$dateNow = new DateTime(date('Y-m-d'));
$getDate = new DateTime("2014-07-30");
$interval = $getDate->diff($dateNow);
$return = $interval->days;
echo "Difference ".$return." Days";