ord
(PHP 4, PHP 5)
ord — Restituisce il valore ASCII di un carattere
Descrizione
int ord
( string $string
)
Restituisce il valore ASCII del primo carattere di string . Questa è la funzione complementare di chr().
Example#1 Esempio di uso di ord()
<?php
$str = "\n";
if (ord($str) == 10) {
echo "The first character of \$str is a line feed.\n";
}
?>
Qui si può reperire la tabella ASCII: » https://www.asciitable.com.
Vedere anche chr().