➤ The ord() function returns the ASCII value of the first character of a string. Syntax:
ord(string)
For instance:
echo ord("A")."  -  A\n";  // outputs:   65
echo ord("a")."  -  a\n";  // outputs:   97
echo ord("z")." -  z\n";  // outputs:   122
echo ord(7)."  -  7\n";    // outputs:   55
echo ord("7")."  - '7'\n";  // outputs:   55
by Levani Makhareishvili
2 years ago
PHP
Function
1
Pro tip: use ```triple backticks around text``` to write in code fences