core.php中
$con=mysqli_connect("localhost","root","","mmogezgini");
header('Content-Type: text/html; charset=utf-8');
gamelisti.php
$result = mysqli_query($con,"SELECT * FROM games");
while($row = mysqli_fetch_array($result))
{
?>
HTML CODES
<?php echo $row['game_name']; ?>
HTML CODES
<?php }
mysqli_close($con);
?>
我使用像“ö,ç,ğ,ı”这样的土耳其字符我在数据库中正确看到这些但是当我从数据库中选择它们并用php echo显示它们看起来像问号=(?) 我对数据库utf8_general_ci的编码
答案 0 :(得分:4)
mysqli_set_charset($con, 'utf8');