title: Finding a file with a specific name with any extension
body: <p><em>Please note that I want the compartment number to change.</em></p>
  
  <pre><code>&lt;?php
      $compartment = "1";
  
          /* HERE I NEED SOME SCRIPT TO FIND THE EXTENSION OF THE FILE NAME $compartment AND TO SAVE THAT AS A VARIABLE NAMED 'EXTENSION'.*/
  
      if (file_exists($compartment.$extension)) {
          echo "$compartment.$extension exists!
      } else {
          echo "No file name exists that is called $compartment. Regardless of extension."
      }
  ?&gt;
  
  
  &lt;?php
      $compartment = "2";
  
          /* HERE I NEED SOME SCRIPT TO FIND THE EXTENSION OF THE FILE NAME $compartment AND TO SAVE THAT AS A VARIABLE NAMED 'EXTENSION'.*/
  
      if (file_exists($$compartment.$extension)) {
          echo "$compartment.$extension exists!
      } else {
          echo "No file name exists that is called $compartment. Regardless of extension."
      }
  ?&gt;
  </code></pre>
  
  <p>Thank You!</p>