Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们如何访问购物车的会话变量,以便我们可以获取每个产品的产品 ID?
$products = $_SESSION['cart']->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { // the product's id is $products[$i]['id'] ... }