php chr() function
Translation results:
abbr.
character characteristics;chrome chromium;chromium chromium;chromate chromate
php chr() functionsyntax
Function: Return characters from the specified ASCII value.
Syntax: chr(ascii)
Parameters:
Parameter | Description |
ascii | Required, specify the ASCII value |
Description: chr() function returns characters from the specified ASCII value. ASCII values can be specified as decimal, octal, or hexadecimal values. Octal values are defined with leading 0, and hexadecimal values are defined with leading 0x.
php chr() functionexample
<?php echo chr(82) . "<br>"; // 十进制 echo chr(062) . "<br>"; // 八进制值 echo chr(0x42) . "<br>"; // 十六进制值 ?>
Run instance»
Click the "Run instance" button to view the online instance
Output:
R 2 B