Date String replace
<p>I have a string which is a date, and the format of it is as <code>2012/04/19</code>. I want to replace the <code>/</code> sign with <code>-</code> so it will have the format <code>2012-04-19</code></p>

<p>I tried <code>str_replace</code> but it doesn't work.</p>

<pre><code>str_replace('2012/04/19','/');
</code></pre>
