is that I have doubts about how one session variable can be copied to another. I use foreach but it does not work for me. Thank you. I would appreciate it if you answer me soon. Use foreach to make this copy.
foreach ($_SESSION["shopping_cart"] as $keys => $value)
{
foreach ($_SESSION["shopping_cart_copia"] as $key => $value)
{
$_SESSION["shopping_cart_copia"][$key]["id_producto"] =
$_SESSION["shopping_cart"][$keys]["id_producto"];
$_SESSION["shopping_cart_copia"][$key]["imagen_producto"] =
$_SESSION["shopping_cart"][$keys]["imagen_producto"];
$_SESSION["shopping_cart_copia"][$key]["nombre_producto"] =
$_SESSION["shopping_cart"][$keys]["nombre_producto"];
$_SESSION["shopping_cart_copia"][$key]["precio_producto"] =
$_SESSION["shopping_cart"][$keys]["precio_producto"];
$_SESSION["shopping_cart_copia"][$key]["cantidad_producto"] =
$_SESSION["shopping_cart"][$keys]["cantidad_producto"];
$_SESSION["shopping_cart_copia"][$key]["stock_oculto"] =
$_SESSION["shopping_cart"][$keys]["stock_oculto"];
}
}