This has been driving me crazy. When I put:
for($i = 0; $i < sizeOf($clones); $i++) {
$clones[$i]->attackGroup = $_POST['type'][$i];
}
$clones[2]->attackGroup does not get assigned. But when I put:
for($i = 0; $i < sizeOf($clones); $i++) {
if($i == 2) {
$clones[$i]->attackGroup = $_POST['type'][$i];
}
}
It does.... How is this possible?