获取数据的代码
$db = mysql_connect("localhost","root","","news");
mysql_query("set names 'utf8'");
$result = mysql_query($db, "SELECT * FROM news_list order by id LIMIT 0,4");
while ($row = mysqli_fetch_array($result))
{ ?>
<li>
<a href="#?id=<?php echo $row['id']; ?>" class="">
<div class="">
<img width="64" height="64" src="<?php echo $row['images']; ?>" class="" alt="" itemprop="image" /> </div>
<div class="">
<?php echo substr($row['description'], 0, 50); ?> తెలుగు </div>
</a>
</li>
<?php } ?>
在这只是我需要添加设置字符集utf8
答案 0 :(得分:-1)
{{1}}