//在action中$fromYear = "2010"; //起始年$toYear = date("Y"); //结束年$listYear = array();while( $toYear >= $fromYear ){ $listYear[$fromYear] = $fromYear; ++$fromYear;}$this->assign("listYear",$listYear);$this->assign("selectYear",array($toYear));/模板中选择年: 年
年