Different Behaviour of TRIM in php
<p>I have a piece of code, from this i want to remove some words from string but the <code>trim()</code> function is not showing proper output.</p>

<p>The code is below</p>

<pre><code>&lt;?php
$mystring = '/word-quotes-hope';
$findme   = '/word-quotes-';
echo $str = trim($mystring, $findme);
?&gt;
</code></pre>

<p>and its output is <code>hop</code>, but it should be <code>hope</code></p>

<p>Its working example <a href="http://codepad.viper-7.com/FxLZkp" rel="nofollow">http://codepad.viper-7.com/FxLZkp</a></p>

<p>Anybody knows why this is happening.</p>
