replace function js to php
<p>I am trying to change a js program to php.
there is a replace function like
$t = t.replace(/B/g, "b");</p>

<p>if i change this to php as
$t = str_ireplace(/B/g, "b",$t);</p>

<p>it shows error about "unexpecting '/' ".  how to solve this.</p>
