Currently in my php file that contains both php and html tags, I am trying to print/echo a variable in Korean from an online database, that uses phpMyAdmin. But whenever I enter a Korean word into a field (안녕
) via phpMyAdmin's "insert" button and try to print/echo it out, the output is always ???
.
My database, tables and fields all use the collation utf8_general_ci
and my php files also contains <meta http-equiv="Content-Type" content="text/html; charset=utf-8 ">
. All other Korean text in the php file print fine, so I dont think there is a problem with the meta
tag. But whenever I try to print Korean text that is stored inside a table from the database, ???
always prints.
Attempts at a Solution
- I have tried different Korean words in the field, but it always
results in
???
. - I have tried inserting Korean text (
안녕
) into the table from inside the php file using theINSERT
query, and tried to print/echo that value from the table usingSELECT
. It prints안녕
without a problem.