Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

American Standard Code for Information Interchange (ASCII)

ASCII is a character encoding standard used to represent text in computers and electronic devices. It assigns a unique number, or code, to each character, allowing text to be stored and processed digitally.

PHP handles ASCII characters with the functions ord() and chr().

<?php

$string = 'abdc';

echo ord($string[1]); // b = 98

echo chr(100); // d

?>

Documentation

See Also