php根据年月获取当月天数及日期数组的方法
2017-02-06
47
本文实例讲述了php根据年月获取当月天数及日期数组的方法。分享给大家供大家参考,具体如下:function get_day( $date ){$tem = explode("-" , $date); //切割日期 得到年份和月份$year = $tem["0"];$month = $tem["1"];if( in_array($month , array( 1 , 3 , 5 , 7 , 8 , 01 , 03 , 05 , 07 , 08 , 10 , ...