preg_replace all spaces
<p>I'm trying to replace all spaces with underscores and the following is not working:</p>

<pre><code>$id = "aa aa";
echo $id;
preg_replace('/\s+/', '_', $id);
echo $id;
</code></pre>

<p>prints</p>

<pre><code>aa aaaa aa
</code></pre>
