subtract some days php

Solutions on MaxInterview for subtract some days php by the best coders in the world

showing results for - "subtract some days php"
Valentín
22 Feb 2016
1// First date of the month.
2$monthFirstDate = date('Y-m-01', strtotime('today'));
3
4// Last date of the month.
5$monthLastDate = date('Y-m-t', strtotime('today'));
6
7// Second last date of the month
8$monthLastSecondDate = date('Y-m-d', strtotime('-2 day', strtotime('today')));