PHP utf8_decode() 函数
定义和用法
utf8_decode() 函数将 UTF-8 编码的字符串解码为 ISO-8859-1。
此函数将之前使用 utf8_encode() 函数编码的字符串解码回 ISO-8859-1。
实例
将 UTF-8 字符串解码为 ISO-8859-1:
<?php $text = "\xE0"; echo utf8_encode($text) ."<br>"; echo utf8_decode($text); ?>
语法
utf8_decode(string)
| 参数 | 描述 |
|---|---|
| string | 必需。指定要解码的 UTF-8 编码字符串。 |
技术细节
| 返回值: | 成功时返回解码后的字符串。失败时返回 FALSE。 |
|---|---|
| PHP 版本: | 4.0+ |