我无法从此多维数组检索所有数据。我已经使用foreach循环进行了编码,但是由于内部循环无法正常工作,因此显示错误。请帮助我。
这是我尝试过的代码
foreach($capture as $k) {
foreach($k['ReportLines'] as $detail){
echo $detail['Quantity'];
echo $k['Description'];
}
}
这是数组
$capture= Array
(
[ReportLines] =>
Array([0] =>
Array(
[Quantity] => 4.00
[Item] => MISPM
[Description] => Midnight
[Price] => 30.00
[Amount] => 120.00
)
[1] =>
Array(
[Quantity] => 40.00
[Item] => BMISPM
[Description] => Midnight2
[Price] => 340.00
[Amount] => 1220.00
)
[2] =>
Array(
[Quantity] => 24.00
[Item] => AMISPM
[Description] => Midnight3
[Price] => 3250.00
[Amount] => 1220.00
)
([3] =>
Array(
[Quantity] => 34.00
[Item] => MIeSPM
[Description] => Midnight
[Price] => 30.00
[Amount] => 120.00
)
)
)
FFIVE