Home >> PHP >> ord() function in PHP

ord() function in PHP

Returns the ASCII value of the first character of string.

Syntax

ord(string)

Example

echo ord("g");
echo ord("good");

Output

103
103

Post Your Comment

Next Questions
parse_str() function
printf() function
quotemeta() function
rtrim() function
sha1() function
sha1_file() function
similar_text() function
str_ireplace() function
str_pad() function
str_repeat() function
str_replace() function
str_shuffle() function
str_split() function
str_word_count() function
strcasecmp() function
strchr() function
strcmp() function
strcspn() function
strip_tags() function
stripslashes() function
stripos() function
stristr() function
strlen() function
strnatcasecmp() function
strnatcmp() function

Copyright ©2022 coderraj.com. All Rights Reserved.