私はコードを使用しています:
$old_month = strtolower(date("m", mktime(date('H'), date('i'), date('s'), (date('m')-12),date('d'), date('Y'))));
$old_year = strtolower(date("Y", mktime(date('H'), date('i'), date('s'), (date('m')-12), date('d'), date('Y'))));
if ( $profile_stats['month'] < $old_month && $profile_stats['year'] == $old_year
|| $profile_stats['month'] == date('m') && $profile_stats['year'] == date('Y') )
If ループは先月の値を取得する必要があります。つまり、今は 10 月です。9
どうすればそれを達成できますか。
解決策を提案してください。