For Subtract 1 month use this code:
Please replace your date with ‘2012-12-12‘.
echo date('Y-m-d', strtotime('-30 day', strtotime('2012-12-12')));
Please replace your date with ‘2012-12-12‘.
echo date('Y-m-d', strtotime('-30 day', strtotime('2012-12-12')));