PHP chr() Function
You are Here:
PHP chr()
The chr()
function returns a character from the specified ASCII Code.
Example
PHP Compiler
<?php
echo chr(65) . "<br>"; // Decimal value
echo chr(065) . "<br>"; // Octal value
echo chr(0x65) . "<br>"; // Hexadecimal value
?>
Output
A
5
e
Syntax
chr(ascii_code)
Parameter Values
Value | Type | Explanation |
---|---|---|
ascii_code | Required | Specifies the ascii code. |
Return Value
Value | Explanation |
---|---|
string | Returns a character from the specified ASCII Code. |
Reminder
Hi Developers, we almost covered 90% of String functions and Interview Question on PHP with examples for quick and easy learning.
We are working to cover every Single Concept in PHP.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.