PHP String 函数
返回 "S" 的 ASCII值:
<?php echo ord("S")."<br>"; echo ord("Shanghai")."<br>"; ?>
运行实例
ord() 函数返回字符串的首个字符的 ASCII 值。
ord(string)