How to Get the Date 30 Days Ago in PHP
To get the date of 30 days ago in PHP, you can use the 'strtotime' and 'date' functions. Here is an example:
$thirtyDaysAgo = date('Y-m-d', strtotime('-30 days'));
echo $thirtyDaysAgo;
This code will output the date 30 days ago in the format 'YYYY-MM-DD'.
原文地址: https://www.cveoy.top/t/topic/o787 著作权归作者所有。请勿转载和采集!