Home / PHP Tips Generated By ChatGPT / 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