这个购物车数组,不能获取整个cartList,要修改"用户1"的数据,有没有什么办法?
$cartList = [
"用户1" =>[
"商品1" => ["id"=>1,"name"=>"商品1","price"=>10,"number"=>1],
"商品2" => ["id"=>2,"name"=>"商品2","price"=>20,"number"=>2]
],
"用户2" =>[
"商品1" => ["id"=>1,"name"=>"商品1","price"=>10,"number"=>1],
"商品2" => ["id"=>2,"name"=>"商品2","price"=>20,"number"=>2]
]
];