title: Problem with function removing accents and other characters in PHP
body: <p>I found a simple function to remove some undesired characters from a string.</p>
  
  <pre><code>function strClean($input){
  
  $input = strtolower($input);
  $b = array("á","é","í","ó","ú", "ñ", " "); //etc...
  $c = array("a","e","i","o","u","n", "-"); //etc...
  
  $input = str_replace($b, $c, $input);
  
  return $input;
  }
  </code></pre>
  
  <p>When I use it on accents or other characters, like this word 'á é ñ í' it prints out those question marks or weird characters, like:
  <a href="http://img217.imageshack.us/img217/6794/59472278.jpg" rel="nofollow noreferrer">output http://img217.imageshack.us/img217/6794/59472278.jpg</a></p>
  
  <p>Note: I'm using strclean.php (which contains this function) and index.php, both in UTF-8. index.php looks as follows:</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;?php
      include('strclean.php');
  
      echo 'óóóáà';
      echo strClean('óóóáà');
  
  
      ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>What am I doing wrong?</p>