Blog : PHP ord() Function
PHP ord() Function
--------------------------------------------------------------------------------
Complete PHP String Reference
--------------------------------------------------------------------------------
Definition and UsageThe ord() function returns the ASCII value of the first character of a string.
Syntaxord(string)
Parameter Description
string Required. The string to get an ASCII value from
--------------------------------------------------------------------------------
Example
echo ord("h")."
";
echo ord("hello")."
";
?>
The output of the code above will be:
104
104