PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php Привет, подскажите пожалуйста в чем причина? Код: for ($i = 0; $i < count($games); $i++) { $index = mt_rand(0, count($dates) - 1); $date = $dates[$index]; $matches[] = new Matches($date, $games[$i], $stadiums[mt_rand(0, 3)]); unset($dates[$index]); } $dates это массив с датами. При удалении элемента через unset($dates[$index]) выдает ошибку Undefined array key на сточку $date = $dates[$index], хотя unset после выполняется.
Show:  
Copy Clear