Formatting a PHP string in UTF8

Asked

Viewed 234 times

-1

I have in a $variable the following content:

Conteúdo da variável $descricao

I would like the words "metallic" "plastic" "dimensions" to be normal. What should I use?

  • 1

    at the beginning of your file put the tag, <meta charset='UTF-8'>

  • Friend, this is information being dealt with within a PHP function in the controller. I need to format this string correctly to build a JSON body.

  • read this post https://pt.meta.stackoverflow.com/questions/5483/manual-de-como-n%C3%83o-fazer-perguntas/5485#5485

1 answer

1

I resolved with html_entity_decode() the final code is like this:

$descricao = html_entity_decode($descricao);

Browser other questions tagged

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