如何显示php数组?

I am new in php. I am using the youtube api for search. youtube give me data in array but i don't know how to display this array in foreach loop. Would you help to solve his issue.

This is youtube api data

> 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
>                 )
> 
>         )

I am using the this method to display this array. but not working.

<?php

foreach($result as $value){

    echo $value[0]['id']['videoId'];
}