Ad Code

Getting last month's date in php

It's simple to get last month date
echo date("Y-m-d", strtotime("first day of previous month"));
echo date("Y-m-d", strtotime("last day of previous month"));

Display
2014-10-01
2014-10-30

Post a Comment

0 Comments