title: Making strings "URL safe"
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2103797/url-friendly-username-in-php">URL Friendly Username in PHP?</a>  </p>
  </blockquote>
  
  
  
  <p>Is there a way to make strings "URL safe" which means replacing whitespaces with hyphens, removing any punctuation and change all capital letters to lowercase?</p>
  
  <p>For example:</p>
  
  <pre><code>"This is a STRING" -› "this-is-a-string"
  </code></pre>
  
  <p>or</p>
  
  <pre><code>"Hello World!" –› "hello-world"
  </code></pre>