I'm trying to store an Arabic text to the table, I searched a lot but I didn't find a solution that worked for me, so this is what I got:
$en = "OK";
$ar = "حسناً";
$link->query("INSERT INTO words (en,ar) VALUES ($en,$ar)");
The problem is when I insert it, the Arabic text looks like ØØ³Ù†Ø§Ù‹
, my table's collation and MySQL's are utf8_general_ci
, so is my database's, I also have mysql_query("SET NAMES 'utf8'"); mysql_query('SET CHARACTER SET utf8');
, but it doesn't work.