$json_return = '
{
"thailand": [
{
"city": "Bangkok",
"contact": {
"phone": "088888888",
"line_id": "line-thailand-bangkok"
}
},
{
"city": "Chiang Mai",
"contact": {
"phone": "0887777777",
"line_id": "line-thailand-chiang-mai"
}
}
],
"usa": [
{
"city": "New York",
"contact": {
"phone": "0886666666",
"line_id": "line-thailand-new_york"
}
},
{
"city": "Chicago",
"contact": {
"phone": "0885555555",
"line_id": "line-thailand-chicago"
}
}
]
}
';
ถ้าผมต้องการดึงค่าของ thailand > chiang mai contact > phone เขียนยังไงหรอครับ
ผมทำตาม
http://php.net/manual/en/function.json-decode.php แล้วงงมาก งมมาตั้งแต่เที่ยง ไม่เข้าใจจริง ๆ
รบกวนดึงให้ดูซักอันครับ ขอบคุณครับ