时间:2021-07-01 10:21:17 帮助过:6人阅读
if($new) { //new item selected if(!isset($_SESSION['cart'])) { $_SESSION['cart'] = array(); // $_SESSION['items'] = 0; $_SESSION['total_price'] ='0.00'; } if(isset($_SESSION['cart'][$new])) //这一句是什么意思??$new是一个传入的参数,该参数是一本书的isbm码,9787111262817,请问$_SESSION['cart'][$new] 是什么意思??这样会得出什么结果?能否详细描述下。感谢ing.... $_SESSION['cart'][$new]++; else $_SESSION['cart'][$new] = 1;
??你能看懂??
$new='a';
$_SESSION['cart']=array(
'a'=>'xxx',
);