<?php

       

		// Add each result to the appropriate list, and then display the lists of

        // matching videos, channels, and playlists.

        echo '<ul class="media-list">';

        foreach ($searchResponse['items'] as $searchResult) {

          switch ($searchResult['id']['kind']) {

            case 'youtube#video':

?>

                     <li class="media">

                            <div class="media-left">

                                <a href='https://www.youtube.com/v/<?=$searchResult['id']['videoId']?>?version=3&f=videos&app=youtube_gdata' target='_blank'><img src='<?=$searchResult['snippet']['thumbnails']['default']['url']?>' height='150'/></a>

                            </div>

                            <div class="media-body">

                                <h4 class="media-heading"><?=html_entity_decode($searchResult['snippet']['title']);?></h4>

                                <?=  html_entity_decode($searchResult['snippet']['description']);?>

                            </div>

                    </li>        

<?

              break;



          }

        }

        

        echo '</ul>';