Answers for "date expiry after two days in php"

PHP
0

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 "date expiry after two days in php"

Browse Popular Code Answers by Language