PHP chr() Function

The chr() function is used to get a single character string from the specified ASCII value.

Return values: A one-character string containing the character specified by ascii _code

Example

<?php
echo chr(52) . "<br>"; // Decimal value
echo chr(052) . "<br>"; // Octal value
echo chr(0x52) . "<br>"; // Hex value
?>

Outout

4
*
R

Leave a Reply

Your email address will not be published. Required fields are marked *