title: PHP function trim() not stripping whitespace from the middle of the string
body: <p>I have some pretty straight-forward code, but something's going wrong. The following code</p>
  
  <pre><code>$title = $_POST['templatename'];
  $user = $_POST['username'];
  $selectedcoordinates = $_POST['templatestring'];
  
  $title = trim($title);
  $user = trim($user);
  
  
  $filename = $title . "_by_" . $user;
  
  var_dump($title);
  var_dump($user);
  var_dump($filename);
  </code></pre>
  
  <p>returns this: </p>
  
  <pre><code>string(11) "Single Tile"
  string(6) "Author"
  string(21) "Single Tile_by_Author" 
  </code></pre>
  
  <p>where the values originate from a HTML form. Why doesn't <code>"Single Tile"</code> become <code>"SingleTile"</code>?</p>