一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

php中返回ascii值函数odr

时间:2010-12-08 编辑:简简单单 来源:一聚教程网

ord() 函数返回字符串第一个字符的 ascii 值。

语法
ord(string)
*/
$str="h";            //定义字符
$result=ord($str);          //求其ascii码
echo "字符".$str."的ascii码为:".$result;     //输出的结果,72

热门栏目