下面是json代碼,我有o顯示它的值。下面json顯示輸出值
$jsondata = '{
"flowers": [
{
"id": "1",
"name": "Le Grand Bouquet Blanc",
"price": "65",
"currency": "euro"
},
{
"id": "2",
"name": "Roses",
"price": "33",
"currency": "euro"
},
{
"id": "3",
"name": "Mandarine",
"price": "125",
"currency": "euro"
}
]
}';
輸出給定要來這樣
Name : Le Grand Bouquet Blanc, Price : 65
Name : Roses, Price : 33
Name : Mandarine, Price : 125
Total: 223 Euro
任何幫助如何獲取輸出?
['json_decode'](http://php.net/manual/ro/function.json-decode.php)與所述第二個參數TRUE;以獲得代替'std'對象的陣列。之後,這是一個不同的故事。 – Andrew
請解釋說明 – Kirataka
@Kirataka你嘗試過什麼? –