如何获得本月起的未来12个月?
如何获得本月起的未来12个月?
我现在用的是:
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->for($i=1;$i'.$nextdate;}
// 参数表示好多个月,你也可以修改为指定日期开始function c($num = 12){ $temp = array(); $nowtime = strtotime( date('Y-m', time()) . '-1' ); while( $num>0 ){ $num--; $nowtime = strtotime( '+1 month', $nowtime ); $temp[] = date('Y-m', $nowtime); } unset( $num, $nowtime ); return $temp;}print_r( c() );<div class="clear"> </div>