Hmm, I did have settype($id, "integer"), but I changed it to the example above, and it just got stranger...
Here's the code that unsets it:
if(isset($_POST['updateCart_x'])) {
while(list($key,$value) = each($_POST)) {
print_r($_POST);
$id1 = str_replace("update_","",$key);
$id = (int) $id1;
$iQnt = (int) $value;
if($iQnt == 0) {
unset($_SESSION['cart'][$id]);
} else {
$_SESSION['cart'][$id] = $iQnt;
}
}
header("Location: ".$_SERVER['PHP_SELF']);
} /* ends update cart function */
So, if my array looks this:
[cart] => Array ( [1431] => 1 [50] => 1 ) )
And I press update, I wind up with this:
[cart] => Array ( [1431] => 1 [0] => 17 )