I'm trying to get previous month of current month.
For example, current month is October , the value return should be September.
I've tried
$currmonth = date('m', strtotime('-1 month'));
But it return the same month - October. But when I replace to -2month
, it will return August which is correct.