嘗試從JSON接收的結果中打印記錄。下面是JSON的結果我想打印[resourceName]
和[get] from [v1.1.0] => Array
我怎樣才能得到這個工作的格式使用PHP打印JSON結果
我得到的$result = json_decode($result,true);
Array
(
[title] => API Directory
[description] => This directory contains links for Product Feed API and Delta Feed API of all categories with all the versions available
[apiGroups] => Array
(
[affiliate] => Array
(
[name] => affiliate
[apiListings] => Array
(
[food_nutrition] => Array
(
[availableVariants] => Array
(
[v0.1.0] => Array
(
[resourceName] => food_nutrition
[get] =>
[deltaGet] =>
[top] =>
[post] =>
[put] =>
[delete] =>
)
[v1.1.0] => Array
(
[resourceName] => food_nutrition
[get] =>
[deltaGet] =>
[top] =>
[post] =>
[put] =>
[delete] =>
)
)
[apiName] => food_nutrition
)
)
)
)
)
?請指教。
類似'echo $ result ['apiGroups'] ['affiliate'] ['apiListings'] ['food_nutrition'] ['availableVariants'] ['v1.1.0'] ['resourceName']'? – bzeaman