I'm helping for my school website,and then i try to display some data form the database,the image source and link is work just fine,but when try to display some chines string,is became ?????
,my PHP document is already using UTF-8 and same as SQL utf8_unicode_ci
,but is still showing some ?????
Showing content code:
header('Content-Type: text/html; charset=UTF-8');
$getNews = mysql_query("SELECT * FROM news");
while ($rows = mysql_fetch_array($getNews)) {
$img = $rows['img'];
$title = $rows['title'];
$link = $rows['link'];
echo '<div class="showNewsBox">';
echo '<div class="showNews">';
echo "<a href='$link' target='_blank'>";
echo "<img src='$img' class='newsImage'>";
echo "<h3 class='newsTitle'>" . $title . "</h3>";
echo "</a>";
echo "</div>";
}
PHP UTF-8 code
<meta charset="utf-8">