Problems with php characters, with utf-8. How to solve?

Asked

Viewed 543 times

-3

I created a php table that returns MYSQL data in phpadmin, but the information returned in the table is coming like this:

"Mine the Data and Simulate the"

Note the question that comes in place of accents with TIL.

I put UTF8 Unicode CI, but still no funnel. Any suggestions of what to do?

  • Try to put header('Content-Type: text/html; charset=utf-8'); or use PHP function itself, utf8_decode() and utf8_encode(). You can also set the collation in connection with mysql, or change the collation from the usandp archive itself Notepad++.

2 answers

1

You can also use mysqli_set_charset($conn, 'utf8');

-1

@header( "Content-Type: text/html; charset=ISO-8859-1", true );

Solution above.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.