ord()

It return ASCII value of character

Example

<?php
echo “ASCII value of ‘a’ is “.ord(“a”);
?>

Output

ASCII value of ‘a’ is 97

Share