Definition
The ord() function returns the ASCII value of the first character of a string.
Syntax
ord(string)
Parameters
Parameter | Description |
---|---|
string |
Required. The string to get an ASCII value from. |
Example
<?php
echo ord("w") . "<br>";
echo ord("Welcome") . "<br>";