How to remove http://www. from php array
<p>How to remove http:// www. from php array,</p>

<p>here is my code that displays a store url and I just want domain.com to be displayed instead of <a href="http://www.domain.com" rel="nofollow">http://www.domain.com</a>, also may show as <a href="http://domain.com" rel="nofollow">http://domain.com</a></p>

<p>code: <code>&lt;p class="store-url"&gt;&lt;a href="&lt;?php echo $url_out; ?&gt;" target="_blank"&gt;&lt;?php echo $stores_url; ?&gt;</code></p>

<p>It displays like this because of this function</p>

<pre><code>&lt;div class="store"&gt; 

&lt;?php // grab the store meta data 
$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
$stores_url = esc_url(get_metadata(APP_TAX_STORE, $term-&gt;term_id, 'clpr_store_url', true));
$dest_url = esc_url(get_metadata(APP_TAX_STORE, $term-&gt;term_id, 'clpr_store_aff_url', true));

// if there's a store aff link, then cloak it. else use store url
if ($dest_url)
$url_out = esc_url(home_url(CLPR_STORE_REDIRECT_BASE_URL . $term-&gt;slug));
else
$url_out = $stores_url; 

?&gt;
</code></pre>
