What is the value of buy.php goods[$name]['name']?
夕阳醉了2018-05-21 18:41:08
0
2
1514
The last level array of goods contains the name, price, and quantity of a single product. Should its name be goods[$i]['name']? I hope experts can answer it
The code of this buy.php is wrong. $goods = $_SESSION['goods']; and $_SESSION['goods'] = $goods; are not needed. $goods[$name]['*'] should be written as $goods['goods'] [$name]['*']
The code of this buy.php is wrong. $goods = $_SESSION['goods']; and $_SESSION['goods'] = $goods; are not needed. $goods[$name]['*'] should be written as $goods['goods'] [$name]['*']
Multi-dimensional array You will know it after trying it. If you don’t have the code, we can’t answer it