title: How to pull only 1 image from folder in php?
body: <p>I have working code, which pulls all images from a dynamically created folder. But I want to display only 1 image from a particular folder in my display page. Any suggestions? 
  My code: </p>
  
  <pre><code>&lt;?php 
      $search_dir = "$directory/{$row['name']}{$row['hotel_address']}";
      $images = glob("$search_dir/*.jpg");
      sort($images);
      //display images
      foreach ($images as $img) {
          echo "&lt;img src='$img' height='150' width='150' /&gt; ";
      }
  
  ?&gt;
  </code></pre>