我有一个utf-32字符的十进制值:
$a=21644;
如何使用php将其转换为十六进制的字符串?'548c'
这是我正在使用的代码页面:http://www.fileformat.info/info/unicode/char/548c/index.htm
dechex
就是您所需要的:
php > echo dechex(21644);
548c
您需要使用dechex
:
$hex = dechex($decimal);
点击此处阅读更多
我有一个utf-32字符的十进制值:
$a=21644;
如何使用php将其转换为十六进制的字符串?'548c'
这是我正在使用的代码页面:http://www.fileformat.info/info/unicode/char/548c/index.htm
dechex
就是您所需要的:
php > echo dechex(21644);
548c
您需要使用dechex
:
$hex = dechex($decimal);
点击此处阅读更多