I want to separate 4 quarter months from current month.
$q1Start = date('Y-m-01',strtotime('-2 months'));
$q1End = date('Y-m-d');
$q2Start = date('Y-m-01',strtotime('-5 months'));
$q2End = date('Y-m-d',strtotime('-3 months'));
$q3Start = date('Y-m-01',strtotime('-8 months'));
$q3End = date('Y-m-t',strtotime('-6 months'));
$q4Start = date('Y-m-01',strtotime('-11 months'));
$q4End = date('Y-m-t',strtotime('-9 months'));
But its not showing the exact date.
I want like this.
2015-06-01
2015-08-31
2015-03-01
2015-05-31
2015-02-28
2014-12-01
2014-09-01
2014-11-30
How to decrease by current month? Thanks