I want to get last month\'s date. I wrote this out:
$prevmonth = date(\'M Y\');
Which gives me the current month/year. I can\'t tell if I
You can use strtotime, which is great in this kind of situations :
$timestamp = strtotime('-1 month'); var_dump(date('Y-m', $timestamp));
Will get you :
string '2009-11' (length=7)