I have the following problem:
In my PHP code I am making a select
in a table that contains information in Arabic اختبار
. But in PHP it is returning ?????
.
I'm using Php 5.2.10.
I have the following problem:
In my PHP code I am making a select
in a table that contains information in Arabic اختبار
. But in PHP it is returning ?????
.
I'm using Php 5.2.10.
You may need to set charset , use the mysqli_set_charset
.
See an example (taken from the documentation):
$mysqli = new mysqli("localhost", "my_user", "my_password", "test");
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
printf("Initial character set: %s\n", $mysqli->character_set_name());
/* change character set to utf8 */
if (!$mysqli->set_charset("utf8")) {
printf("Error loading character set utf8: %s\n", $mysqli->error);
exit();
} else {
printf("Current character set: %s\n", $mysqli->character_set_name());
}
$mysqli->close();