how to retrieve data stored in the database in different language and print in php, mysql or drupal

While retrieving the data stored in the  database in different languages, it will be retrieved as unknown format(???).  
To avoid this problem and to retrieving the original values please use the below given code before your select query 

mysql_query("SET NAMES utf8");
mysql_query("SET CHARACTER SET utf8");

Comments

Popular posts from this blog

PHP - How to increase size of POST value in php

D8 KernelEvents constants

D8 - Attach file programmatically to a node