Letzter Tag des Vormonats in PHP
$lastDay = date('t',strtotime('last month'));
print_r($lastDay);
Ankur
$lastDay = date('t',strtotime('last month'));
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;
echo date('M Y', strtotime("-1 month"));
//to get date with time of previous month
echo date("Y-m-d H:i:s",strtotime("-1 month"));