title: How to get the filename without the extension in php?
body: <p>I'm using the following code to display the name of a CSV file before the contents of the CSV file are displayed on a PHP page. It works well and displays the name of the file as it should:</p>
  
  <p>CODE:</p>
  
  <pre><code>    #$result .= '&lt;h3&gt;'.$prog.'&lt;/h3&gt;'.PHP_EOL; // OLD STYLE
      $result .= '&lt;h3&gt;'.$prog. ' '.$_POST['filename'].'&lt;/h3&gt;'.PHP_EOL; // NEW STYLE
      $result .= '&lt;/div&gt;'.PHP_EOL;
      $result .= $contents.PHP_EOL;
  </code></pre>
  
  <p>Problem is, I don't want the file name to display the extension (in my code example, it is .csv)</p>
  
  <p>Can anyone assist in the right code needed to remove the extension (.CSV)...?</p>