MySQL php arabic not showing

anvar php mysql

In your application or in the website Arabic language or other languages appears like “????” question marks. You can use the below instructions to solve the problems.

If you have same problem in printing in the android application convert into Unicode and it will automatically show the original content in the application.

You must set charset in first connect with mysql this query: this action need before insert and before select.

SET CHARACTER SET utf8

for example in mysqli functions

$con = mysqli_connect(HOSTNAME,DB_USERNAME,DB_PASSWORD,DB_NAME) 
or die ( mysqli_error($con) ); 

$query1= 'SET CHARACTER SET utf8'; 

mysqli_query($MySQL_Handle,$query1) 
or die ('Can\'t charset in DataBase'); 

If it’s not working try these methods also

1.set the content type in the html header.

<meta http-equiv="content-type" content="text/html; charset=utf-8">
header("content-type: text/html; charset=utf-8");

2.try the below php qury

mysql_set_charset('utf8', $con);
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER_SET utf8;");
mysql_query("SET NAMES utf8 COLLATE utf8_turkish_ci",$db );