更新时间:2022-05-15 02:45:58
您快到了,只需按以下方式更改 foreach
循环,
You're almost there, just change your foreach
loop in the following way,
foreach ($dimsDesc as $desc) {
$descriptions[$desc['indcode']]['indlabel'] = $desc['indlabel'];
$descriptions[$desc['indcode']]['description'] = $desc['description'];
}
或者,
foreach ($dimsDesc as $desc) {
$descriptions[$desc['indcode']] = array('indlabel' => $desc['indlabel'], 'description' => $desc['description']);
}
这里是文档,