strtotime This function means generating a timestamp. If strtotime(' -1days') is like this, it is the timestamp of this time yesterday. If you want to output the date, time, minutes and seconds. echo date('Y-m-d H:i:s'); or echo date('Y-m-d H:i:s',strtotime('-1days')); You can also replace now This function has more parameters. Go read the manual
strtotime This function means generating a timestamp. If strtotime(' -1days') is like this, it is the timestamp of this time yesterday. If you want to output the date, time, minutes and seconds. echo date('Y-m-d H:i:s'); or echo date('Y-m-d H:i:s',strtotime('-1days')); You can also replace now This function has more parameters. Go read the manual