Jump to content

Simple: Convert Letter To Number


johnsmith153

Recommended Posts

Rather than lots of if statements, how would it be best to covert a persons name into a number rank?

 

Ie. Bob

b=02 (2nd letter of alphabet)

o=15 (15th etc.)

b=02

bob=021502 (21502)

 

I know this sounds crazy, but I also add other numbers to the front to decide how something should be ranked.

 

Link to comment
https://forums.phpfreaks.com/topic/126834-simple-convert-letter-to-number/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.