小编Sea*_*ean的帖子

foreach中提供的PHP无效参数

我试图用foreach循环读出这个嵌套数组,但得到一个错误"在foreach中提供的无效参数"

Array ( 
  [regenerated] => 1302668837 
  [id] => 2 
  [qty] => 1 
  [price] => 1200 
  [name] => support 
  [optione] => 
  [cart_contents] => Array ( 
                      [c4ca4238a0b923820dcc509a6f75849b] => Array ( 
                                                             [rowid] => c4ca4238a0b923820dcc509a6f75849b 
                                                             [id] => 1 
                                                             [qty] => 1 
                                                             [price] => 29.95 
                                                             [name] => Training DVD 
                                                             [optione] => 
                                                             [subtotal] => 29.95 
                                                           ) 
                      [c81e728d9d4c2f636f067f89cc14862c] => Array ( 
                                                             [rowid] => c81e728d9d4c2f636f067f89cc14862c 
                                                             [id] => 2 
                                                             [qty] => 1 
                                                             [price] => 1200 
                                                             [name] => support 
                                                             [optione] => 
                                                             [subtotal] => 1200 
                                                           ) 
                      [total_items] => 2 
                      [cart_total] => …
Run Code Online (Sandbox Code Playgroud)

php

2
推荐指数
1
解决办法
9148
查看次数

标签 统计

php ×1