title: PHP get everything in a string before underscore
body: <p>I have this code here:</p>
  
  <p><code>$imagePreFix = substr($fileinfo['basename'], strpos($fileinfo['basename'], "_") +1);</code></p>
  
  <p>this gets me everything after the underscore, but I am looking to get everything before the underscore, how would I adjust this code to get everything before the underscore?</p>
  
  <p><code>$fileinfo['basename']</code> is equal to 'feature_00'</p>
  
  <p>Thanks</p>