我使用代碼:mktime函數不能正常工作
$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'))
的如果loop應該採取的最後month..i.e的價值。它現在十月..如果應該搜索sept ie。 9
我該如何做到這一點。
請提出任何解決方案。
可能重複http://stackoverflow.com/questions/12960824/php-script-getting -month-error) – Ray