[ACCEPTED]-How to find the start and end date of a previous month in PHP-php

Accepted answer
Score: 44

I guess this would do

echo date('Y-m-d', strtotime('first day of last month'));

echo "<br/>";

echo date('Y-m-d', strtotime('last day of last month'));

0

Score: 5
echo date('m-01',strtotime('last month')) . '<br/>';
echo date('m-t',strtotime('last month')) . '<br/>';

0

More Related questions