how to delete 2 spaces or break line become one space?
<p>here is my coding is break line str_replace</p>

<pre><code>$finalresult = "a&lt;\n&gt;b";
$strreplace = str_replace("\n", "", $finalresult);
echo $strreplace;
</code></pre>

<p>here is my coding is 2 spaces str_replace</p>

<pre><code>$finalresult = "a  b";
$strreplace = str_replace("  ", "", $finalresult);
echo $strreplace;
</code></pre>

<p>result1 : </p>

<pre><code>a

b
</code></pre>

<p>result2 :</p>

<pre><code>a  b
</code></pre>

<p>my question is why my str_replace does not working at all ? </p>
