Saturday, September 24, 2011

Retrive utf8 character encoding from mysql table in Php

Before executing Mysql Query just these lines in the php code which helps to get utf8 character from mysql database
    mysql_query('SET character_set_results=utf8');
mysql_query('SET names=utf8');
mysql_query('SET character_set_client=utf8');
mysql_query('SET character_set_connection=utf8');
mysql_query('SET character_set_results=utf8');
mysql_query('SET collation_connection=utf8_general_ci');

All these lines are important just put as it is.