Answers for "get remaining days from two dates php"

PHP
1

count remaining days php

$future = strtotime('25 July 2021');
$now = time();
$timeleft = $future-$now;
$daysleft = round((($timeleft/24)/60)/60);
Posted by: Guest on March-23-2021
-1

get 2 days before date in php

date('Y/m/d',strtotime("-1 days"));

Or Use DateTime class like this-

$date = new DateTime();
echo $date->modify("-1 days")->format('Y-m-d');
Posted by: Guest on June-22-2021

Code answers related to "get remaining days from two dates php"

Browse Popular Code Answers by Language