Remove http from variable
<p>I have a variable, such as this:</p>

<pre><code>$domain = "http://test.com"
</code></pre>

<p>I need to use preg_replace or str_place to get the variable like this:</p>

<pre><code>$domain = "test.com"
</code></pre>

<p>I have tried using the following, but they do not work.</p>

<pre><code>1) $domain = preg_replace('; ((ftp|https?)://|www3?\.).+? ;', ' ', $domain);
2) $domain = preg_replace(';\b((ftp|https?)://|www3?\.).+?\b;', ' ', $domain);
</code></pre>

<p>Any suggestions?</p>
