如何从 PHP 中的以下 json 获取“持续时间”值:
{
"kind": "youtube#videoListResponse",
"etag": "\"6jI4SSPcXxEAc3i_1EQHOPi0Cvc/EGNSBh81ISlkeECbqD9xdh5C340\"",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 1
},
"items": [
{
"kind": "youtube#video",
"etag": "\"6jI4SSPcXxEAc3i_1EQHOPi0Cvc/yUebIRJfQ62Pq5XpRbqJHx7Xozo\"",
"id": "7lCDEYXw3mM",
"contentDetails": {
"duration": "PT15M51S",
"dimension": "2d",
"definition": "hd",
"caption": "true",
"licensedContent": false,
"contentRating": {
"ytRating": ""
}
}
}
]
}
尝试了许多示例,但要么导致对象错误或无效索引错误?