📅  最后修改于: 2022-03-11 14:54:11.735000             🧑  作者: Mango
$tgl = '25 january 2012';
$prevmonth = date("M Y",mktime(0,0,0,date("m", strtotime($tgl))-1,1,date("Y", strtotime($tgl))));
echo $prevmonth;