title: How to fully replace all special characters in PHP without leaving any HTML Entity in the result
body: <p>I need help with a PHP replace function I am trying to create.</p>
  
  <p>Basically, I want to FYLLY convert all special characters like <code>á, é, í, ó, ú, ü, ñ, Á, É, Í, Ó, Ú, Ü, Ñ</code> and so on to this:  <code>a, e, i, o, u, u, n, A, E, I, O, U, U, N</code>. Below is explained why I say "FULLY convert".</p>
  
  <p>Now I have only managed to do this half way using the below function:</p>
  
  <pre><code>function clean_url($text){
           $text = preg_replace('~&amp;([a-z]{1,10})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities($text, ENT_QUOTES, 'UTF-8'));
      return $text;
  }
  </code></pre>
  
  <p>This at first glance gives me the desired result when viewed in MySQL or a browser, so in PHP:</p>
  
  <pre><code>$string = "Ábalos";
  echo clean_url($string);
  </code></pre>
  
  <p>HTML Page source code output: <code>Abalos</code>. This look about right at first glance.</p>
  
  <p>But when I do </p>
  
  <pre><code>$string = "Ábalos";
  echo htmlentities(clean_url(($string));
  </code></pre>
  
  <p>HTML Page source code output: <code>A&amp;Acirc;?balos</code>. </p>
  
  <p>I want to be able to replace with my function also that part <code>&amp;Acirc;?</code>. 
  How can this be achieved?</p>