I have a Netherlands texts saved in my table. They show well in MySQL table like this Wilt u hoogstens één of twee kinderen, ook al kunt u zich qua gezondheid en inkomen meer kinderen permitte
When I select that text and do an echo
with PHP I get Wilt u hoogstens ��n of twee kinderen, ook al kunt u zich qua gezondheid en inkomen meer kinderen permitte
.
I tried to set the PHP page to use <meta http-equiv="content-type" content="text/html; charset=utf-8">
and also tried to do echo utf8_decode($text)
but the text is still not showing as in the table. Any help on this please? Thanks.
Note: the table field collation where the text is stored is utf8mb4_general_ci
To select the text from my table I'm using PHP PDO:
function get_questions($userBrowserLanguage, $dbh) {
$query = "SELECT Frage, FrageNr FROM `tbl_fragen` WHERE Language = ? AND Test = ? AND Frage != ? ORDER BY FrageNr ASC";
$parameters = array('nl', 'OCA55', '');//$userBrowserLanguage
$sth = do_query($query, $parameters, $dbh);
$questions = array();
while ($question = do_fetch_result($sth)) {
array_push($questions, array($question['FrageNr'], $question['Frage']));
}
return $questions;
}