Skip to content

PHP code snippet – How to insert hindi text in mysql database?

  first of all open database structure and change  
  table Collation  to (utf8_general_cithen) save the changes

  You need to just add few queries when you establish database connection so 
  that your database support for utf8 Unicode characters.
  Add the below lines to your database Config FIle

mysqli_query($con,"SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'");
See also  How to add parentheses for number in Java?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.