Skip to content
Advertisement

Display special characters returned from mySQL in drop down select box

I am trying to display utf8 characters in a drop down box which is pulled from mySQL (utf8_general_ci) the characters are returning as diamonds with a ? in the middle on.

I have tried htmlspecialchars and htmlentities. And it returns a blank string. Site also has the charset set to utf-8.

Thank you very much.

Advertisement

Answer

Try using utf8_encode() function and see if it works.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement