How to Get Previous Day From Date In Php?

Admin   PHP   423  2021-03-17 20:00:08

Hi Guys,

In this example,I will learn you how to get previous day from date in php.you can easy and simply get previous day from date in php.

we will show you how to get previous day from date in php.if you want to get previous day from date in php then you can use bellow example.

Example:

 

<?php

$date = "2020-01-11";

$newdate = date("Y-m-d",strtotime ( '-1 day' , strtotime ( $date ) )) ;

echo $newdate;

?>

Output:

 

2020-01-10

It will help you...