Invalid Characters not displaying

89 Views Asked by At

I have an xml feed which i cannot edit, its remote.

Now when i import it to db

it says this:

A taste of Turkey for £21 10 Meze dishes, bread and drinks for two at Cirrik Fulham

but is outputting this:

A taste of Turkey for £21 –10 Meze dishes, bread and drinks for two at Cirrik Fulham

Is there a php function i can use to fix this tried htmlspecialchars() and htmlentities() no luck.

1

There are 1 best solutions below

2
On BEST ANSWER

use

echo mb_convert_encoding($string_from_db, 'HTML-ENTITIES', 'UTF-8');