Chaîne de caractères
AddCSlashes AddSlashes bin2hex chop chr chunk_split convert_cyr_string count_chars crc32 crypt echo explode get_html_translation_table get_meta_tags hebrev hebrevc htmlentities htmlspecialchars implode join levenshtein localeconv ltrim md5 metaphone nl2br ord parse_str print printf quoted_printable_decode QuoteMeta rtrim sscanf setlocale similar_text soundex sprintf strncasecmp strcasecmp strchr strcmp strcoll strcspn strip_tags StripCSlashes StripSlashes stristr strlen strnatcmp strnatcasecmp strncmp str_pad strpos strrchr str_repeat strrev strrpos strspn strstr strtok strtolower strtoupper str_replace strtr substr substr_count substr_replace trim ucfirst ucwords wordwrap
Description
int ord(string string )
ord retourne la valeur ASCII du premier caractère de la chaîne string. ord est le contraire de chr.
<?phpif (ord($str) == 10) { echo "Le premier caractère de \$str est un retour chariot.\n";}?>
Voir aussi chr.