Easy Tutorial
❮ Func Math Hexdec Php Ref Libxml ❯

PHP ord() Function

PHP String Reference Manual

Example

Returns the ASCII value of "h":


Definition and Usage

The ord() function returns the ASCII value of the first character of a string.


Syntax

Parameter Description
string Required. The string to get the ASCII value from.

Technical Details

Return Value: Returns the ASCII value as an integer.
PHP Version: 4+
--- ---
❮ Func Math Hexdec Php Ref Libxml ❯