【发布时间】:2025-12-15 21:45:01
【问题描述】:
我如何正确地减去当月的 1 个月?
$current_month1 = date('m');
$current_month = $current_month1-1;
echo $current_month;
//current ouput
6
//desired output
06
【问题讨论】:
-
数值没有前导零。如果您想要前导零,请在输出时格式化数字。
标签: php