我无法从此多维数组检索所有数据。我已经使用foreach循环进行了编码,但是由于内部循环无法正常工作,因此显示错误。.请帮助我。
这是我尝试过的代码
ReferenceError: collectionRef is not defined
at exports.addlikechange.functions.database.ref.onWrite (/user_code/index.js:60:36)
at cloudFunctionNewSignature (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:120:23)
at cloudFunction (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:151:20)
at /var/tmp/worker/worker.js:827:24
at process._tickDomainCallback (internal/process/next_tick.js:135:7)
这是数组
foreach($capture as $k) {
foreach($k['ReportLines'] as $detail){
echo $detail['Quantity'];
echo $k['Description'];
}
}
)
答案 0 :(得分:1)
尝试这种方式:
foreach($capture['ReportLines'] as $detail) {
echo $detail['Quantity'];
echo $detail['Description'];
}
抱歉,响应速度很快,但我正在通过电话写信。
我将尽快编辑答案