I need to encode a result from a MySQL query to JSON format.
My database is in the encoding utf8_unicode_ci
.
In particular, I have some special chars (for example, €) stored in my database which produce a null value when I apply the PHP function json_encode
.
How can I fix this?