title: PHP preg_split get rid of trailing spaces in just one line?
body: <p>How can i get rid of trailing spaces in <code>preg_split</code> result <strong>without</strong> using <code>preg_replace</code> to first remove all spaces from <code>$test</code> string?</p>
  
  <pre><code>$test   = 'One , Two,   Thee   ';
  $test   = preg_replace('/\s+/', ' ', $test);
  $pieces = preg_split("/[,]/", $test);
  </code></pre>