1

I have some text, for example: “ £   € “ I would like to decode it, so it outputs: £ €

I tried this code, but it doesn't work:

utf8_decode($utf8);
iconv('UTF-8', 'ISO-8859-1', $utf8);
mb_convert_encoding($utf8, 'ISO-8859-1', 'UTF-8');

utf8_encode($iso88591);
iconv('ISO-8859-1', 'UTF-8', $iso88591);
mb_convert_encoding($iso88591, 'UTF-8', 'ISO-8859-1');

I don't want to do a str_replace for each character.

Nigel Ren
  • 56,122
  • 11
  • 43
  • 55

1 Answers1

2
echo html_entity_decode('“ £   € “');
Nilesh Lathe
  • 152
  • 5