我已經設置爲常數,開始年和結束的一年,
所以我必須建立在條件while循環PHP增加值
if the start year is < than the current year increment until true.
我的問題是,與其它往上走是這樣的:
1999,2000,2001,2002,2003,2004
它是這樣:
1999,2001,2003,2005,2007,2009
這裏是我的代碼:
function yearCount()
{
$yearBegin = START_YEAR;
$yearCurrent = CURRENT_YEAR;
while($yearBegin < $yearCurrent){
echo "<option value=\"".$yearBegin++."\">".$yearBegin++."</option>";
}
}
任何想法將不勝感激。
請顯示您的代碼。 – RobertPitt 2010-12-05 12:56:28