我有一個包含類似下面的數據帶列標題的CSV文件轉換CSV到鍵控JSON
100271311,90445XXXX,Active
100271400,99456XXXX,Cancelled
100271552,94280XXXX,Pending
我想上面的轉換爲PHP JSON輸出像下面
{
"100271311": {
"FIELD2": "90445XXXX",
"FIELD3": "Active"
},
"100271400": {
"FIELD2": "99456XXXX",
"FIELD3": "Cancelled"
},
"100271552": {
"FIELD2": "94280XXXX",
"FIELD3": "Pending"
}
}
請幫助
非常感謝您的快速反應 –