Turning a name into a URL-friendly string in PHP?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2103797/url-friendly-username-in-php">URL Friendly Username in PHP?</a>  </p>
</blockquote>



<p>I have something like this:</p>

<pre><code>'mrt1' =&gt; 'Zhongxiao Dunhua Sun'
</code></pre>

<p>which will be included into an anchor link like this:</p>

<pre><code>&lt;a href="'. $mrt1 .'"&gt;'. $mrt1 .'&lt;/a&gt;
</code></pre>

<p>I want the output to be something like this:</p>

<pre><code>&lt;a href="zhongxiao-dunhua-sun"&gt;Zhongxiao Dunhua Sun&lt;/a&gt;
</code></pre>

<p>How to do it so that I can turn that name into a URL-frienly string (so I can place it in the href attribute)?</p>
