I can't explain much but I am currently trying to remove a product from shopping cart which is saved in cookie.
if(isset($_GET['remove'])) {
$remove = $_GET["remove"];
foreach($cart_saved as $q) {
if($q == $remove) {
unset($cart_saved[$q]);
setcookie("shop_items", json_encode($cart_saved), time() + 36000);
}
}
The value is deleted from the array but I can't update the cookie