0
我已經創建了一個橄欖球/足球比賽的固定發電機通過循環...使用日期語法問題
for ($round = 0; $round < $totalRounds; $round++) {
for ($match = 0; $match < $matchesPerRound; $match++) {
$home = ($round + $match) % ($teams - 1);
$away = ($teams - 1 - $match + $round) % ($teams - 1);
// Last team stays in the same place while the others
// rotate around it.
if ($match == 0) {
$away = $teams - 1;
}
$rounds[$round][$match] = "$user[$home]~$team[$home]@$user[$away]~$team[$away]~$roundDates[$round]";
}
}
我改變了一個問題,我幾乎沒有。
$roundDates[$round]
這段代碼,我需要$ round-1。 這是什麼正確的語法? 乾杯