redbrad0 Posted January 20, 2007 Share Posted January 20, 2007 Does PHP have a function to convert a letter to a number, and a number to a letter? A example would be...A = 1B = 2C = 3D = 4E = 5F = 6etc Link to comment https://forums.phpfreaks.com/topic/35010-finding-numeric-value-of-a-letter-in-the-alphabet/ Share on other sites More sharing options...
flash gordon Posted January 20, 2007 Share Posted January 20, 2007 ord() i believehttp://us3.php.net/manual/en/function.ord.phpconverts to ASCII. if you are looking for number position in the alphabet, just write your own function. Link to comment https://forums.phpfreaks.com/topic/35010-finding-numeric-value-of-a-letter-in-the-alphabet/#findComment-165110 Share on other sites More sharing options...
redbrad0 Posted January 20, 2007 Author Share Posted January 20, 2007 ok so i can do ord("A") which will return 65char(65) which will return AThanks for your help Link to comment https://forums.phpfreaks.com/topic/35010-finding-numeric-value-of-a-letter-in-the-alphabet/#findComment-165117 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.