单列中的 JSON 数据。我想打印这些 JSON 数据,但只有其中一个正在写入。这是什么原因?
JSON: {"bid":"123","bid":"1234","bid":"12345","bid":"123456"}
| id| bSQ | bID |
|---|-------|--------------------------------------------------------|
| 1 | 2019 |{"bid":"123","bid":"1234","bid":"12345","bid":"123456"} |
| 2 | 2019 | .. |
| 3 | 2019 | .. |
PHP :
if ($dataFromDBqas) {
foreach ($dataFromDBqas as $dataFromDB) {
$libBookHuge = $dataFromDB->bID;
$hugeArray = json_decode($libBookHuge, true);
foreach ($hugeArray as $key => $value) {
echo "Book ID: ".$value ."<br>";
}
}
}
结果:
书号:123456
为什么只有一行数据?
aluckdog