title: Trim doesn't seem to work PHP
body: <p><br>I'm a fan of the function <code>trim</code> in PHP. However, I think I've run into a weird snag. I have the string named keys that contains: "mavrick, ball,  bouncing, food,  easy mac, " and execute this function</p>
  
  <pre><code>// note the double space before "bouncing"
  $keys = "mavrick, ball,  bouncing, food,  easy mac, ";
  $theKeywords = explode(", ", $keys);
  foreach($theKeywords as $key){
    $key = trim($key);
  }
  echo $theKeywords[2];
  </code></pre>
  
  <p>However here, the output is " bouncing"  not "bouncing". Isn't <code>trim</code> the right function to use here?</p>
  
  <p>edit:
  <br>My original string has two spaces before "bounce", for some reason it didn't want to show up.
  And I tried referencing it with foreach($theKeywords as &amp;$key) but it threw an error.</p>