Home  >  Article  >  Backend Development  >  Return ascii value function odr_PHP tutorial in php

Return ascii value function odr_PHP tutorial in php

WBOY
WBOYOriginal
2016-07-13 16:55:061032browse

Return ascii value function odr in php tutorial
The ord() function returns the ascii value of the first character of a string.

Grammar
ord(string)
*/
$str="h"; //Define character
$result=ord($str); //Get its ascii code
The ascii code of echo "character ".$str." is: ".$result; //Output result, 72

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631716.htmlTechArticleThe ascii value function odr ord() function returns the ascii value of the first character of the string in the php tutorial. Syntax ord(string) */ $str=h;//Define character $result=ord($str);//Find its ascii code echo word...
Statement:
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