int ord ( string str ) returns the equivalent ASCII value
<? $mystr = "ASCII\n"; if (ord($mystr{1}) == 83) { print "The second letter in the string is S\n"; } else { print "The second letter is not S\n"; } ?>