PHP ord() Function

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

int ord ( string $string )

Returns the ASCII value of the first character of string.This function complements chr().

Example -

ParameterDescription
stringA character.

Returns the ASCII value as an integer.