2 variables are involved, $_SESSION['tilaus'] ja $tilaus.
when coming to the code I'm posting, both of them contain the same values, which don't themselves matter.
What matters, is that when other is re-created, both of them are zeroed.
if (isset($_SESSION['tilaus'])) {
$tilaus = array(); //this zeroes both values
foreach ($_SESSION['tilaus'] AS $rid => $row) { //you never get to this loop
$tilaus[$i++] = $row;
}
}
what can cause this ?can both arrays point to same space in memory like in Java objects ?


Sign In
Create Account


Back to top









