English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP String Character String Functions Manual
The chr() function is used to return the specified character
string chr ( int $ascii )
It returns a specific character
Returns the single character corresponding to the specified ascii.
Number | Parameters and descriptions |
---|---|
1 | ASCII ASCII value |
Try the following example, returning characters from different ASCII values:
<?php echo chr(2) . "<br>"; // Decimal value echo chr(05) . "<br>"; // Octal value echo chr(0x2) . "<br>"; // Hexadecimal value ?>Test and see‹/›