Vítor Campeã Vítor Campeã - 1 year ago 64
PHP Question

php - trying to print some special characters

I have been trying to print some characters on my php page and it returns something else, like corrupted characters


"joão", ø, ç, etc

echo '<br>não<br>'

the return is




is this a problem with econding utf-8?

i have tried this code

header('Content-Type: text/html, charset=utf-8');

but no result

Answer Source

You have a typo in your Content-Type header. It's ...; charset=... with a semicolon.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download