我是php新手。我正在使用youtube api进行搜索。 youtube给我数组中的数据,但我不知道如何在foreach循环中显示此数组。你能帮忙解决他的问题吗?
这是youtube api数据
Sender
我正在使用此方法来显示此数组。但没有工作。
> youtube#searchListResponse
> "I_8xdZu766_FSaexEaDXTIfEWc0/5IThma8mHrxfxsqbFRlSwL4sFQ8" CCgQAA IN
> Array (
> [totalResults] => 1000000
> [resultsPerPage] => 40 ) Array (
> [0] => Array
> (
> [kind] => youtube#searchResult
> [etag] => "I_8xdZu766_FSaexEaDXTIfEWc0/7X3dgy0amhVkzwHlFvaEcBgCwb8"
> [id] => Array
> (
> [kind] => youtube#video
> [videoId] => UZcVUfaby9U
> )
>
> [snippet] => Array
> (
> [publishedAt] => 2013-04-28T18:58:55.000Z
> [channelId] => UCFh7FvnJ_0sVP4V0rZe6AaA
> [title] => How to Use Sessions and Cookies in PHP
> [description] => Full source code available at: http://www.johnmorrisonline.com/lesson/sessions-and-cookies-in-php/ In
> this lesson, you'll learn how to uses sessions and ...
> [thumbnails] => Array
> (
> [default] => Array
> (
> [url] => https://i.ytimg.com/vi/UZcVUfaby9U/default.jpg
> [width] => 120
> [height] => 90
> )
>
> [medium] => Array
> (
> [url] => https://i.ytimg.com/vi/UZcVUfaby9U/mqdefault.jpg
> [width] => 320
> [height] => 180
> )
>
> [high] => Array
> (
> [url] => https://i.ytimg.com/vi/UZcVUfaby9U/hqdefault.jpg
> [width] => 480
> [height] => 360
> )
>
> )
>
> [channelTitle] => John Morris
> [liveBroadcastContent] => none
> )
>
> )