Home  >  Article  >  Backend Development  >  php select查询时,字符编码处置

php select查询时,字符编码处置

WBOY
WBOYOriginal
2016-06-13 12:31:211040browse

php select查询时,字符编码处理,
require("db.php");
$sql="SELECT `cityid` FROM `weathercityid` where `city`='广东'";
$result=mysql_query($sql);
var_dump($result);
$a_city=mysql_fetch_array($result);
print_r($a_city);
?>
输出结果为
广东
resource(5, mysql result)
 
 如果把 把广东换成是 数字是字符就可以成功,这个是怎么回事?

select iconv
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn