Answers for "php date 2 days before specific date"

PHP
-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 "php date 2 days before specific date"

Browse Popular Code Answers by Language