Problem with special php characters

1

I'm using php on the html page to validate a form. When the database retries the text to the page php is not displaying the result with special characters. Where is the error?

Page:

 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

MYSQL database table:

utf8_unicode_ci

Result of PHP :

echo "<ul>";  
  echo "<li>";
    echo "<a data-toggle='modal' href='{$link}'>" ;
      echo "{$titulo} </a>- {$descricao}";
  echo "</li>";
  echo "</ul>";
    
asked by anonymous 14.04.2016 / 15:55

1 answer

1

See your bank if you are recording information correctly. If so, change this:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

For this:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Your bank's encode should be latin1_swedish_ci , because it accepts accents, ç and all Latin characters.

Or, try:

 echo "utf8_decode({$titulo}) </a>- utf8_decode({$descricao})";
    
14.04.2016 / 16:01