1$lastDateOfNextMonth =strtotime('last day of next month') ;
2
3$lastDay = date('d/m/Y', $lastDateOfNextMonth);
4
5
6
7print_r($lastDay);
1$tgl = '25 january 2012';
2
3$prevmonth = date("M Y",mktime(0,0,0,date("m", strtotime($tgl))-1,1,date("Y", strtotime($tgl))));
4echo $prevmonth;