Último dia do mês anterior em PHP
$lastDay = date('t',strtotime('last month'));
print_r($lastDay);
Ankur
$lastDay = date('t',strtotime('last month'));
print_r($lastDay);
$lastDateOfNextMonth =strtotime('last day of next month') ;
$lastDay = date('d/m/Y', $lastDateOfNextMonth);
print_r($lastDay);
$tgl = '25 january 2012';
$prevmonth = date("M Y",mktime(0,0,0,date("m", strtotime($tgl))-1,1,date("Y", strtotime($tgl))));
echo $prevmonth;