title: Display the newest file in directory of music files, php
body: <p>I have a directory with many subdirectories. These sub directories act as "playlists" (they contain many music files). The code below will show all of the subdirectories (or playlists). I want to display Only ONE, and I want it to be the newest subdirectory created. So I I run the code now it should display only one and only the newest directory. </p>
  
  <pre><code>$y=0;
  
          foreach(glob('../music/*', GLOB_ONLYDIR) as $playlist) {
              $y=$y+1;
  
              echo "\n";
              echo '&lt;div class="mp_content" id="c_album_'.$y.'"&gt;';
              echo "\n";
              echo '&lt;img src="music/album1/album.jpg" alt="album1"/&gt;';
              echo "\n";
            }
  </code></pre>