Method 1 : Use strtotime
date('Y-m-d',strtotime('-1 day'));
Method 2: Use DateTime Class
$date = new DateTime();
$date->motify('-1 days')->format('Y-m-d');
Method 1 : Use strtotime
date('Y-m-d',strtotime('-1 day'));
Method 2: Use DateTime Class
$date = new DateTime();
$date->motify('-1 days')->format('Y-m-d');