overwriting a part of a session

vsrgiix

New Member
i have a session looking like this:\[code\] array(1) { [31]=> array(10) { ["aantal"]=> int(1) ["id"]=> string(2) "31" ["filmtitel"]=> string(16) "2_fast_2_furious" ["film_id"]=> string(1) "1" ["zaal_id"]=> string(1) "1" ["dag"]=> string(8) "woensdag" ["zaaltitel"]=> string(6) "zaal 1" ["tijdstip"]=> string(8) "17:30:00" ["stoeltjes"]=> array(3) { [0]=> string(2) "20" [1]=> string(2) "21" [2]=> string(2) "22" } ["aantalStoeltjes"]=> string(3) "150" }}\[/code\]my question is, how can i overwrite the content of \[code\]["stoeltjes"]\[/code\]?when i do \[code\]unset($_SESSION['addToCart'][$id]["stoeltjes"]);\[/code\]then \[code\]["stoeltjes"]\[/code\]gets deleted but when i add other values they get put in an extra array inside the stoeltjes array.I assign the new values ass following: \[code\]$_SESSION["addToCart"][$id]["stoeltjes"][] = $seats;\[/code\]
 
Back
Top