如何将数组更改为一个字符串uning php?
这是数组
{
"result": "success",
"message": [
{
"date_insert": "2017-01-28 20:14:51",
"date_update": "2017-01-28 20:15:11",
"weather": "sunny"
}
]
}
我希望天气输出为字符串。感谢
答案 0 :(得分:2)
首先使用带有第二个参数json_decode()
的{{1}}将json转换为数组。然后访问每个数组元素。
true