Use this function to get the ASCII value of a character. Non-ASCII characters will still give you a value here but probably not anything you’d want.

It only uses the first character in the sting passed in and will always return an integer.

$a = ord( 'a' );     // 97
$b = ord( 'A' );     // 65
$c = ord( 'apple' ); // 97
$b = ord( '' );      // 0