I have develop a web site using MySQL 8.0 (uft8mb4) and PHP 5.6 (UTF-8) Where no issues where raised for the INSERT or SELECT data in the DB. ex. the word "sévère" would appear as is in both parties.
The problem appeared when I transfered the web site online. Now using MySQL 5.6 (uft8mb4) and PHP 5.6 (UTF-8) However in PHP the characters (é,è, ê, exc..) appears not as wanted.
In DB : sévère
In PHP : s�v�re
If I INSERT the data from PHP to DB
In DB : s�v�re
In PHP : sévère
I get the opposite.
I assume that it is not caused by uft8mb4 vs utf8 since I didn't have the issue before, even though I was using the same configuration. However, it seems the it is related.
How can I resolve this, so that both PHP display ( SELECT) and the DB (INSERT) display the same exact information ?