title: Converting stranging characters extracted from mysql db
body: <p>I have some problems extracting data from a mysql database. It contains some text in spanish, and I retrieve some weid chars when I do a query via php. </p>
  
  <p>The text seems fine when I do query via mysql terminal. </p>
  
  <p><strong>Text extracted from php</strong></p>
  
  <blockquote>
    <p>No se est� valorando lo suficiente el deporte y la situaci�n es muy
    jodida</p>
  </blockquote>
  
  <p><strong>Text from mysql terminal</strong></p>
  
  <blockquote>
    <p>No se está valorando lo suficiente el deporte y la situación es muy jodida</p>
  </blockquote>
  
  <p><strong>Extraction code</strong></p>
  
  <pre><code>$db = new mysqli( $host, $user, $password, $bd );
  
  $query = "select * from news limit 10";
  
  $res = $db-&gt;query( $query );
  $arr = [];
  while ( $row = $res-&gt;fetch_assoc() ){
     $arr[] = $row;
  }
  
  return $arr;
  </code></pre>
  
  <p>What can I do to change this chars for a correct value. </p>
  
  <p>Thanks, Ismael. </p>