php won't detect all spaces in a string
<p>I've got a string that comes from a POST form where I want to replace all spaced with some other character.</p>

<p>Here's that I did:</p>

<pre><code>$cdata = str_replace(" ","#",$cdata);
</code></pre>

<p>And I got this.</p>

<pre><code>--- Contact-ID#=#148 [10274da8]#Sinhronizācija#=#private [1000137d]#Uzvārds#=#Zom [1000137c]#Vārds#=#Tana [1000130e]#Tālrunis#=#3333 [1000130e]#Mobilais#=#5555
</code></pre>

<p>As you can see, spaced before "[10..." are still there. Any ideas what could be the problem?</p>
