php中返回ascii值函数odr
ord() 函数返回字符串第一个字符的 ascii 值。
语法
ord(string)
*/
$str="h"; //定义字符
$result=ord($str); //求其ascii码
echo "字符".$str."的ascii码为:".$result; //输出的结果,72
文章链接:https://www.phprm.com/develop/36495.html
随便收藏,请保留本文地址!
ord() 函数返回字符串第一个字符的 ascii 值。
语法
ord(string)
*/
$str="h"; //定义字符
$result=ord($str); //求其ascii码
echo "字符".$str."的ascii码为:".$result; //输出的结果,72
文章链接:https://www.phprm.com/develop/36495.html
随便收藏,请保留本文地址!