Home > php教程 > php手册 > php中返回ascii值函数odr

php中返回ascii值函数odr

WBOY
Release: 2016-05-25 16:57:07
Original
1727 people have browsed it

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

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

永久链接:

转载随意!带上文章地址吧。

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template