Getting the ASCII Value of a Character in PHP


Find the ASCII value of the first character of a string with ord().

Source Code

$char = "a";
echo ord($char); // Outputs: 97
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments