You are here : phpstringord

ord() - string

Returns the ASCII value of the first character of
   string.
Parameters :
  • string - A character.

  • Syntax

    int ord
        ( string $string
       )


    Example

    <?php$str = "\n";if (ord($str) == 10) {    echo "The first character of \$str is a line feed.\n";}?>


    Output / Return Value


    Limitations


    Alternatives / See Also


    Reference