chr() function in PHP || PHP chr() function
×


chr() function in php

1894

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:





Best WordPress Hosting


Share:


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price



Leave a Reply


Comments
    Waiting for your comments