嘿,我想看看这个数组中的最高票数是多少,然后从中获取file_path。
images =>
backdrops =>
0 =>
file_path => /gM3KKiN80qbJgKHjPnmAfwxSicG.jpg
width => 1920
height => 1080
iso_639_1 =>
aspect_ratio => 1.78
vote_average => 5.4529616724739
vote_count => 19
1 =>
file_path => /7u3pxc0K1wx32IleAkLv78MKgrw.jpg
width => 1920
height => 1080
iso_639_1 =>
aspect_ratio => 1.78
vote_average => 5.4509803921569
vote_count => 22
2 =>
etc etc....
我尝试这样做,但无法获取任何数据:
foreach($theMovieData['images']['backdrops'][0]['vote_count'] as $key => $item) {
echo $item;
}
我会做错什么?在找到最高票后我将如何获得file_path?
谢谢您的帮助!