How to make PHP accept accent? [duplicate]

-1

How can I make PHP accept accents like "'" and "^". It would have to work on this list that I created in PHP (This is not the complete code in the list).

<td><?php echo $dado['RM'];?></td>
<td><?php echo $dado['Nome'];?></td>
<td><?php echo $dado['Email'];?></td>
<td><?php echo $dado['Turma_ID'];?></td>
    
asked by anonymous 22.09.2018 / 17:43

1 answer

0

Place the section below on the part of your page that has HTML, where HEAD has.

<head>
   <meta charset="utf-8">
</head>

Also put in your PHP code on each line that print data, but test something like this:

<td><?php echo utf8_decode($dado['RM']);?></td>

Or

<td><?php echo utf8_encode($dado['RM']);?></td>

At the beginning with PHP, HTML, CSS, Javascript and etc ... I used this query source a lot:

W3 Schools

    
22.09.2018 / 18:09