您好,我有一个 PHP 脚本,它正在获取信息,然后将其放入一个数组中,这里是 Json 数组的样子
{
"People": [
{
"Person1": {
"Op": "5459",
"Name": "Place holder",
"WorkHours": "5.0",
"Start": "3:00PM",
"End": "8:00PM",
"Clock": false,
"OFF": false,
"ON": false,
"OUT": false
}
},
{
"Person2": {
"Op": "5630",
"Name": "Place holder",
"WorkHours": "8.75",
"Start": "7:45AM",
"End": "4:30PM",
"Clock": "07:26:49",
"OFF": false,
"ON": false,
"OUT": false
}
},
{
"Person3": {
"Op": "5617",
"Name": "Place holder",
"WorkHours": "8.5",
"Start": "7:45AM",
"End": "4:15PM",
"Clock": "07:47:06",
"OFF": "12:00:59",
"ON": false,
"OUT": false
}
},
{
"Person4": {
"Op": "5596",
"Name": "Place holder",
"WorkHours": "5.0",
"Start": "7:45AM",
"End": "2:45PM",
"Clock": "07:46:43",
"OFF": "12:01:10",
"ON": false,
"OUT": false
}
},
{
"Person5": {
"Op": "5722",
"Name": "Place holder",
"WorkHours": "3.0",
"Start": "5:00PM",
"End": "8:00PM",
"Clock": false,
"OFF": false,
"ON": false,
"OUT": false
}
}
]
那么循环遍历这种数组然后将其输出到 html 表格中的最佳方法是什么?
最佳答案
关于javascript - 将 Json 放入 HTML 表格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25243569/