Du har bestilt en ${result['beskrivelse']}
"; session_start(); $found = false; $amount = (int) $_POST['amount'][$result['id']]; foreach ($_SESSION['kurv'] as &$item) { if ($item['id'] == $result['id']) { $item['amount'] += $amount; $found = true; break; } } if(!$found) $_SESSION['kurv'][] = [ 'id' => $result['id'], 'amount' => $amount ]; break; } ?>Du har bestilt en ${result['beskrivelse']}
"; session_start(); $found = false; $amount = (int) $_POST['amount'][$result['id']]; foreach ($_SESSION['kurv'] as &$item) { if ($item['id'] == $result['id']) { $item['amount'] += $amount; $found = true; break; } } if(!$found) $_SESSION['kurv'][] = [ 'id' => $result['id'], 'amount' => $amount ]; break; } ?>