chr() function in php
Last Updated by Pooja Chikara
0 2131
PHP chr() function is used to returns characters corresponding to given ASCII values. It is an inbuilt function of PHP. The return type of this function is character means it returns characters.
Syntax:
chr($ascii_code);
here,
$ascii_code represents an ASCII value.
Example:
<?php echo chr(96) . "<br>"; // return single quote echo chr(040) . "<br>"; // return whitespace echo chr(47) . "<br>"; // return division ?>
Output:

Share:
Recommended Topics:
You May Also Like
PHP Examples
News letter
Subscribe To Never Miss an Article From
Comments
Waiting for your comments