Database Data Collection accent error [duplicate]

-1

Well, I have a query that takes the data from a database table and stores it in an array, however, the data in the database has accents.

When I print on the screen the data with

<?php echo $array["nome"]; ?>

How can I fix this?

    
asked by anonymous 27.03.2016 / 17:40

1 answer

1

Try this:

<?php echo utf8_encode($array["nome"]); ?>

or:

<?php echo utf8_decode($array["nome"]); ?>

See the documentation at:

link

    
27.03.2016 / 18:04