title: What php pair of functions is recommended to convert text into url slug and reverse way?
body: <p>I am interesting to convert city and country names into <code>url friendly and allowed</code> texts.</p>
  <p>Examples</p>
  <ol>
  <li><code>South Africa</code> - we cannot have spaces into urls, so the slug would need to be something like <code>south-africa</code> then I can form the url like <code>example.com/places/south-africa</code></li>
  <li><code>Meksikë</code> is ë character allowed for urls ? would this url be fine <code>example.com/places/meksikë</code></li>
  <li>I see inside the data also places like ... <code>50013 Campi Bisenzio, Metropolitan City of Florence</code> that would be like <code>50013-campi-bisenzio-metropolitan-city-of-florence</code></li>
  </ol>
  <p>The idea is that the places names come in a variaty of languages dynamically might be country, city names with all possible characters from all around the world.</p>
  <p>Therefore this brings me to the question if some standard or <code>php</code> function as I am using php exist to parse strings to url allowed texts.</p>
  <p>I know about <code>urlencode</code> but that one creates ugly texts
  For my first example would generate <code>South%20Africa</code> instead of south-africa</p>
  <p>I don't know all possible characters that might came across, basically all might be possible à á â ä æ ã  and so on and forth.</p>
  <p>I need a pair of functions.
  One to map text -&gt; url friendly
  The reverse function to map url -&gt; original text</p>
  <p>Any suggestions ?</p>