I would like to get an array containing strings like this: 2013-03, 2013-02, 2013-01, 2012-12, 2012-11... etc.
How would I go about it? I tried working with a loop and DateInterval class, but surprisingly 30.March -1month gives us 2.March, so that's not very useful.
$date = new DateTime();
$date->sub(DateInterval::createFromDateString('1 month'));
Thanks!