显示我的php数组中的项目

显示我的php数组中的项目,php,arrays,multidimensional-array,Php,Arrays,Multidimensional Array,我在阅读这个网站上的一些问题时得到了很多帮助,所以我想我会发布一个我自己的问题。我最近一直在摆弄数组,想知道如何显示我拥有的数组中的某些项目 array(1) { [0]=> array(4) { ["kind"]=> string(25) "youtube#videoListResponse" ["etag"]=> string(57) ""blahblah"" ["pageInfo"]=> array(2) { ["totalResults"]=> int(1)

我在阅读这个网站上的一些问题时得到了很多帮助,所以我想我会发布一个我自己的问题。我最近一直在摆弄数组,想知道如何显示我拥有的数组中的某些项目

array(1) { [0]=> array(4) { ["kind"]=> string(25) "youtube#videoListResponse" ["etag"]=> string(57) ""blahblah"" ["pageInfo"]=> array(2) { ["totalResults"]=> int(1) ["resultsPerPage"]=> int(1) } ["items"]=> array(1) { [0]=> array(5) { ["kind"]=> string(13) "youtube#video" ["etag"]=> string(57) ""blahblah"" ["id"]=> string(11) "XS6ysDFTbLU" ["snippet"]=> array(9) { ["publishedAt"]=> string(24) "2014-08-15T17:22:04.000Z" ["channelId"]=> string(24) "UCnEiGCE13SUI7ZvojTAVBKw" ["title"]=> string(35) "Bill Gates ALS Ice Bucket Challenge" ["description"]=> string(212) "Bill Gates accepts Mark Zuckerberg’s ALS Ice Bucket Challenge and nominates Elon Musk, Ryan Seacrest and Chris Anderson from TED to participate and raise awareness for ALS, also known as Lou Gehrig’s Disease." ["thumbnails"]=> array(5) { ["default"]=> array(3) { ["url"]=> string(46) "https://i.ytimg.com/vi/XS6ysDFTbLU/default.jpg" ["width"]=> int(120) ["height"]=> int(90) } ["medium"]=> array(3) { ["url"]=> string(48) "https://i.ytimg.com/vi/XS6ysDFTbLU/mqdefault.jpg" ["width"]=> int(320) ["height"]=> int(180) } ["high"]=> array(3) { ["url"]=> string(48) "https://i.ytimg.com/vi/XS6ysDFTbLU/hqdefault.jpg" ["width"]=> int(480) ["height"]=> int(360) } ["standard"]=> array(3) { ["url"]=> string(48) "https://i.ytimg.com/vi/XS6ysDFTbLU/sddefault.jpg" ["width"]=> int(640) ["height"]=> int(480) } ["maxres"]=> array(3) { ["url"]=> string(52) "https://i.ytimg.com/vi/XS6ysDFTbLU/maxresdefault.jpg" ["width"]=> int(1280) ["height"]=> int(720) } } ["channelTitle"]=> string(13) "thegatesnotes" ["categoryId"]=> string(2) "29" ["liveBroadcastContent"]=> string(4) "none" ["localized"]=> array(2) { ["title"]=> string(35) "Bill Gates ALS Ice Bucket Challenge" ["description"]=> string(212) "Bill Gates accepts Mark Zuckerberg’s ALS Ice Bucket Challenge and nominates Elon Musk, Ryan Seacrest and Chris Anderson from TED to participate and raise awareness for ALS, also known as Lou Gehrig’s Disease." } } ["statistics"]=> array(5) { ["viewCount"]=> string(8) "23231956" ["likeCount"]=> string(6) "206532" ["dislikeCount"]=> string(4) "4471" ["favoriteCount"]=> string(1) "0" ["commentCount"]=> string(5) "14548" } } } } } 
这就是我试图从中提取值的数组。有人可能会告诉我如何显示本地化的标题,默认缩略图和视窗计数与php。我想从那以后我可以设法把剩下的事情弄清楚。任何帮助都将不胜感激。谢谢

附言。 我尝试使用下面的代码,但没有成功

$MYarray = array($ARRAY_Data);
echo $MYarray['items'][0]['statistics']['viewCount']; 

$ARRAY\u Data保存着我在顶部发布的数组。

看起来导致您出现问题的原因是:

$MYarray = array($ARRAY_Data);
这只是在原始数组周围添加了另一个数组,这似乎不是必需的,并且基于您的var_dump输出(如果您没有这样做),在下一行中

echo $MYarray['items'][0]['statistics']['viewCount'];
实际上,您已经在使用正确的数组键来获取所需的值。所以只需跳过
$MYarray=array($array\u Data)
并在原始数组上使用相同的键:

echo $ARRAY_Data['items'][0]['statistics']['viewCount'];

请拿着这本书读一读。你试过什么了?我已经用更多的信息更新了我的问题对不起。