title: PHP: Find last occurrence in string
body: <p>I am trying to drop the last vowel in a string. For example:</p>
  
  <pre><code>$string = 'This is a string of words.';
  
  $vowels = array('a','e','i','o','u');
  
  if (in_array($string, $vowels)) {
  
      // $newstring = '' // Drop last vowel.
  
  }
  
  echo $newstring; // Should echo 'This is a string of wrds.';
  </code></pre>
  
  <p>How can I do this?</p>
  
  <p>Thanks</p>