CHR(3) 1 CHR(3)
chr - Return a specific character
SYNOPSIS
string chr (int $ascii)
DESCRIPTION
Returns a one-character string containing the character specified by $ascii.
This function complements ord(3).
PARAMETERS
o $ascii
- The ascii code.
RETURN VALUES
Returns the specified character.
EXAMPLES
Example #1
chr(3) example
<?php
$str = "The string ends in escape: ";
$str .= chr(27); /* add an escape character at the end of $str */
/* Often this is more useful */
$str = sprintf("The string ends in escape: %c", 27);
?>
SEE ALSO
sprintf(3) with a format string of %c, ord(3), An ASCII-table.
PHP Documentation Group CHR(3)