php trim function
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/7082295/replacing-excess-whitespaces">Replacing excess whitespaces</a>  </p>
</blockquote>



<p>When I trim using PHP It just trim left and right side of PHP. Isn't their any function that remove more than 2 white spaces between a string? </p>

<p>Suppose I have this </p>

<pre><code>"Stack       Overflow"
</code></pre>

<p>and I want this</p>

<pre><code>"Stack Overflow"
</code></pre>
