Monday, May 20, 2013

How to encoding UTF-8 string to ASCII from Database

I have convert data from excel to mysql,
but when i printout to browser from database
seen string ugly..
i have resolve this issue, when i googling..


This simple way, just put the code like the bellow.
mb_convert_encoding($string_from_db, 'HTML-ENTITIES', 'UTF-8');

No comments:

Post a Comment