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'))