PHP trim() not trimming space
<p>I have run into a strange problem. I am trying to trim a string using php <code>trim()</code>, but it is not working.</p>

<p>Here is my code</p>

<pre><code>echo $deal-&gt;{self::DEAL_BUSINESS};
echo '&lt;br&gt;';
echo trim($deal-&gt;{self::DEAL_BUSINESS});
echo '&lt;br&gt;';
</code></pre>

<p>And here is the output</p>

<pre><code> Alkaram Studio
 Alkaram Studio
</code></pre>

<p>If it is not clear from the output. There is a space in the beginning of both untrimmed and the trimmed string.</p>

<p>In the view source I got this.</p>

<pre><code>&amp;nbsp;Alkaram Studio
</code></pre>