title: Sort an array with special characters in PHP
body: <p>I have an array that holds the names of languages in spanish:</p>
  
  <pre><code>$lang["ko"] = "coreano"; //korean
  $lang["ar"] = "árabe"; //arabic
  $lang["es"] = "español"; //spanish
  $lang["fr"] = "francés"; //french
  </code></pre>
  
  <p>I need to order the array and maintain index association, so I use <a href="http://ca.php.net/asort" rel="noreferrer">asort()</a> with the <strong>SORT_LOCALE_STRING</strong></p>
  
  <pre><code>setlocale(LC_ALL,'es_ES.UTF-8'); //this is at the beginning (config file)
  asort($lang,SORT_LOCALE_STRING);
  print_r($lang);
  </code></pre>
  
  <p>The expected output would be in this order:</p>
  
  <ul>
  <li>Array ( [ar] => árabe [ko] => coreano [es] => español [fr] => francés )</li>
  </ul>
  
  <p>However, this is what I'm receiving:</p>
  
  <ul>
  <li>Array ( [ko] => coreano [es] => español [fr] => francés [ar] => árabe )</li>
  </ul>
  
  <p>Am I missing something? Thanks for your feedback! (my server is using PHP Version 5.2.13)</p>