date ,
details {
"target1" : "test1",
"count1" : "3",
"remarks1" : "done",
"target2" : "test2",
"count2" : "3",
"remarks2" : "done",
"target3" : "test3",
"count3" : "3",
"remarks3" : "running"
}
其中日期(pk)和详细信息是表的两个字段。显示特定日期的表中的行。
最佳答案
我真的不知道“php 表”是什么。但您可能需要功能 json_decode()和 array_merge() .
对于从数据库获取的每一行:
$table[] = array_merge($row['id'], json_decode('details'))
关于php - 如何使用主键日期解码json中多行数据并在php表中显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34417344/