chr
(PHP 3, PHP 4 , PHP 5)
chr -- Retorna um caracter específico
Descrição
string
chr ( int ascii )
Retorna uma string de um único caractere contendo o caracter especificado
pelo ascii.
Exemplo 1. chr() exemplo
<?php $str = "The string ends in escape: "; $str .= chr(27); /* add an escape character at the end of $str */
/* Often this is more useful */
$str = sprintf("The string ends in escape: %c", 27); ?>
|
|
Você pode encontrar uma tabela ASCII-table aqui: http://www.asciitable.com.
Esta função complementa ord(). Veja também
sprintf() com uma string no formato de
%c.