I need to get the first day of last name everyday. I used to code it like this:
echo date('Ym01',strtotime('last month'));
But today (March 30,2017), it returned the first day of this month, not last month.
I tried echo date('Y-m-d', strtotime('first day of last month'));
from this question but it returned 1970-01-01
instead.
Can someone explain to me why the code return date like that?