I´m working on a Wordpress plugin and for a strange reason, I save correctly strings in the database with the char €
but to display it, even if I don´t use the wordpress way with $wpdb
but like this ( Notice : this piece of code was just to check if it was a deeper matter, it´s not to use it ) :
$query = "SELECT option_value FROM wp_options WHERE option_name = '" . $this->current_options_name . "' LIMIT 1";
$conn = new \mysqli("host", "username", "password", "dbname");
$output = $conn->query($query);
if ($output->num_rows > 0) {
// output data of each row
while($row = $output->fetch_assoc()) {
var_dump($row);
}
} else {
echo "0 results";
}
That displays ?
instead of €
in string values.
Important notices
- I don´t have this problem with the char
$
. - The char
€
is stored correctly in the database, I can see it in the table value inside PHPMyAdmin.
Someone has got an idea ?