The ord() function returns the ASCII value of the first character of the string.
Syntax: ord(string);
string – the input string
Example input:
echo ord("Hello");
Example output:
72
Showing posts with label ascii value. Show all posts
Showing posts with label ascii value. Show all posts
Wednesday, October 1, 2008
Sunday, September 14, 2008
The chr() function
chr() returns the character corresponding to an ASCII value
Example inputs:
echo chr(100);
echo "
";
echo chr(101);
echo "
";
echo chr(0101);
echo "
";
echo chr(0XFF);
Example inputs:
echo chr(100);
echo "
";
echo chr(101);
echo "
";
echo chr(0101);
echo "
";
echo chr(0XFF);
Labels:
ascii value,
chr,
chr function,
chr9),
php,
programming,
string manipulation,
strings in php
Subscribe to:
Posts (Atom)