The chr() function returns the specific characters. It converts an ASCII value to a character.
Syntax
chr(ascii)
Parameters
ascii − Specify the ASCII value
Return
The chr() function returns the character of the ASCII value passed.
The following is an example −
Example
<?php $val = 50; echo chr($val); ?>
The following is the output −
Output
2
Let us see another example −
Example
<?php $val = 88; echo chr($val); ?>
The following is the output −
Output
X