这是异步发送到我的php页面的JSON。本质上,这是一个产品列表,它将插入到我的mySQL数据库中。
我的问题是在PHP中解码JSON。我可以使用``eval’‘函数在js中做到这一点,但是在PHP中,我的努力导致了一系列复杂的爆炸和内爆函数。
{
"Product": [
{
"Product_Title": "Cloth",
"Product_Description": "Here is cloth",
"Price": "100",
"Category_ID": "1"
},
{
"Product_Title": "Cloth",
"Product_Description": "Here is cloth",
"Price": "100",
"Category_ID": "1"
},
{
"Product_Title": "Cloth",
"Product_Description": "Here is cloth",
"Price": "100",
"Category_ID": "1"
}
]
}
我知道php具有内置的json_decode函数,但是在PHP文档中,它们仅显示如何处理数组。
任何建议或帮助都非常感谢
泰勒