Google

NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7">

ord

(PHP 3, PHP 4 )

ord -- 文字のASCII値を返す

説明

int ord ( string string)

stringの先頭文字のASCII値を返します。 この関数はchr()と逆の動作をします。

例 1ord()の例

if (ord ($str) == 10) {
    echo "\$str の先頭は改行文字です。\n";
}

ASCIIテーブルをhttp://www.asciitable.comで参照可能です。

chr()も参照下さい。