Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

YouTube Playlist V0.2

By: Streamingdb-net on Oct 12th, 2011  |  syntax: PHP  |  size: 0.78 KB  |  views: 45  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.     <?php
  2.     $videos = get_post_meta($post->ID, "youtube", true);
  3.       if ($videos != "")
  4.       {
  5.         echo '<div id="playlist">';
  6.         echo '<div class="s_playlist">';
  7.         echo '<div id="playlist_t">PLAYLIST <strong>1</strong></div>';
  8.         echo '<div class="cdiv"></div>';
  9.         echo '</div>';
  10.         echo '<div class="description">';
  11.         echo '<ul>';
  12.         $videos = nl2br($videos);
  13.         $videos = explode("<br />", $videos);
  14.         foreach ($videos as $i => $video)
  15.         {
  16.         // output del video
  17.         echo '<li><a href="'.$video.'">'. ($i + 1) .'</a></li>';
  18.         }
  19.         echo '</ul>';
  20.         echo '<div class="cdiv">';
  21.         echo '</div>';
  22.         echo '<br>';
  23.         echo '</div>';
  24.         echo '</div>';
  25.       }
  26.     ?>