title: PHP Remove url-"not allowed" characters from string
body: <p>I have read through all the questions regarding this, and would like to know if <code>$str = preg_replace('/[^\00-\255]+/u', '', $str);</code> is sufficient for my scenario.</p>
  
  <p><strong>My Scenario</strong></p>
  
  <p>When a user creates an account on my site, he enters his company's name. This can be anything including text with <code>'</code> or <code>"</code> or even some other strange characters. When he creates an account, I need to create a folder on my server for him to access his account easier without using <code>uniqids</code> etc.</p>
  
  <p>So for example you create an account for "Peter's Pet Shop &amp; Washing" - I would need to remove all spaces and characters that would not be allowed as a url-address. So at the end I need to have "peterspetshopwashing"</p>
  
  <p>This is so that you can access your account at "www.mydomain.com/peterspetshopwashing"</p>