For this special characters áéí I do this:

$mycaption = htmlentities($mycaption, ENT_QUOTES); Than I receive this:

á&

How can I reverse it back to "áéí"? Thanks

Comments

Which encoding are you using for áéí?

Written by hakre

Do you mean this? <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <meta http-equiv="Content-Language" content="en" />

Written by Uli

Accepted Answer

try html_entity_decode() function

html_entity_decode() is the opposite of htmlentities() in that it converts all HTML entities to their applicable characters from string.

(from the PHP manual)

Written by heximal
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki