Easy Tutorial
❮ Php Ref Timezones Func Cal Unixtojd ❯

PHP chr() Function

PHP String Reference Manual

Example

Returning characters from different ASCII values:


Definition and Usage

The chr() function returns a character from the specified ASCII value.

The ASCII value can be specified as a decimal, octal, or hexadecimal value. Octal values are defined with a leading 0, and hexadecimal values are defined with a leading 0x.


Syntax

Parameter Description
ascii Required. The ASCII value.

Technical Details

Return Value: Returns the specified character.
PHP Version: 4+
--- ---

More Examples

Example 1

Using the octal value 046 to add the ASCII character: &.

Example 2

Using the decimal values 43 and 61 to add the ASCII characters: + and =.


❮ Php Ref Timezones Func Cal Unixtojd ❯