(PHP 4 >= 4.0.6, PHP 5)
Retourne le code UNICODE d'un caractère.
uniord() retourne le code UNICODE du premier caractère de string.
Cette fonction est le contraire de unichr().
<?php function uniord( $string , $encoding = 'UTF-8' ) { $entity = mb_encode_numericentity($string, array(0x0, 0xffff, 0, 0xffff), $encoding); return preg_replace('`^&#([0-9]+);.*$`', '\\1', $entity); } ?>
int uniord ( string $string [, string $encoding = 'UTF-8' ] )
Retourne la valeur UNICODE, sous la forme d'un entier.
Commentaire(s)
Poster un commentaire