I\'m fetching data in Arabic from MySQL tables with MySQLi. So I usually use this in procedural style:
mysql_query(\"SET NAMES \'utf8\'\"); mysql_query(\'SE
It's the same:
$mysqli->query("SET NAMES 'utf8'");
From the manual:
This is the preferred way to change the charset. Using mysqli::query() to execute SET NAMES .. is not recommended.
$mysqli->set_charset("utf8"); is just enough, let the mysqli db driver do the thing for you.
$mysqli->set_charset("utf8");