How to use ASCII value with PHP
Character encoding is useful in web development for generating character strings from random numbers (CAPTCHA images for instance), displaying non-standard characters and many other purposes.
To use charachter encoding with PHP or To use ASCII value with PHP, we have a function to print ASCII value.
string chr ( int $ascii )
The ASCII code
Returns the specified character.
/* Often this is more useful */
$str = "The string ends in escape: ";
$str .= chr(27); /* add an escape character at the end of $str */
$str = sprintf(“The string ends in escape: %c”, 27);