我有像下面數據結構的多維陣列,如何遍歷,得到所需出放PHP多維陣列顯示器
Array
(
[P1-VVS2-VVS2] => Array
(
[S] => Array
(
[1] => Array
(
[key] => P1-VVS2-VVS2
[saw] => S
[row_num] => 1
[assign] => 0
[total_dollar] => 1490140.75
[stone_weight] => 24.5
[dollar] => 4963.00
)
)
[C] => Array
(
[1] => Array
(
[key] => P1-VVS2-VVS2
[saw] => C
[row_num] => 1
[assign] => 0
[total_dollar] => 6080976
[stone_weight] => 44
[dollar] => 6282.00
)
)
)
)
所需出放像,如何可以使用爲每個循環或任何其他顯示所需的結果數據
P1-VVS2-VVS2
S
1
0
1490140.75
24.5
4963.00
P1-VVS2-VVS2
C
1
0
6080976
44
6282.00
您已經嘗試了什麼? –
請嘗試[https://stackoverflow.com/questions/4222983/simplify-a-nested-array-into-a-single-level-array](https://stackoverflow.com/questions/4222983/simplify-a - 陣列成一個單一的數組) –
*「如何可以使用的每個循環」* - 你有沒有嘗試過任何東西?看看[foreach'文檔中的一些例子](http://php.net/manual/en/control-structures.foreach.php)。 – axiac