• PHP Video Tutorials

PHP - Function chr



Syntax

string chr ( int $ascii )

Definition and Usage

It returns the specific characters

Return Values

It returns the specified characters

Parameters

Sr.No Parameters & Description
1

ascii

It contains the ascii value

Example

Try out the following example

<?php
   echo chr(2) . "<br>"; // Decimal value
   echo chr(05) . "<br>"; // Octal value
   echo chr(0x2) . "<br>"; // Hex value
?>
php_function_reference.htm
Advertisements