Home > Backend Development > PHP Tutorial > 怎么把&开头的编码转为中文

怎么把&开头的编码转为中文

WBOY
Release: 2016-06-13 11:11:20
Original
986 people have browsed it

如何把开头的编码转为中文?
我在搞抓取一个页面的内容,但是发现他的中文却是以开头后面数字的形式显示的
不知如何转成中文?
另外它页面是UTF8编码的


------解决方案--------------------
$text = mb_convert_encoding($text, "GBK", "HTML-ENTITIES");

印象中我一周内答这个问题答了三次
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template