How do PHP accept accentuation?

Asked

Viewed 124 times

-1

How can I make PHP accept accents like " " and " ". It would have to work on this list I created in PHP (This is not the complete code from 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>

1 answer

0


Put the excerpt below on the part of your page that has the HTML, there where you have the HEAD.

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

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

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

Or

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

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

W3 Schools

  • Thank you very much, yes! You are very good in PHP, my congratulations, and you are right, I am depending a lot on Stackoverflow, however I do not do this due to lack of desire to search, is that I am really lost with PHP and my English is not very good... But yes, I use w3schools, so much so that I learned a lot of CSS there.

  • 1

    Vinicius, rest assured... using Stackoverflow is normal for every programmer, I sent you W3schools anyway, just for future study. Ask questions here whenever you want and ask!

  • Thank you Luis! Have a great day!

Browser other questions tagged

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