php 获取上个月的时间戳

public function get_lastmonth(){
beginLastmonth=mktime(0,0,0,date(m)1,1,date(Y)); b e g i n L a s t m o n t h = m k t i m e ( 0 , 0 , 0 , d a t e ( ‘ m ′ ) − 1 , 1 , d a t e ( ‘ Y ′ ) ) ; endLastmonth=mktime(23,59,59,date(‘m’)-1,date(‘t’),date(‘Y’));
data=array(stime=> d a t a = a r r a y ( ‘ s t i m e ′ => beginLastmonth,
‘etime’=> endLastmonth);return e n d L a s t m o n t h ) ; r e t u r n data;
}

你可能感兴趣的:(开发)