Lonkero, your last posted function will not work correctly. It's due to the modular math. the reason i had mod $ + 1, is because if the character were say 62, then 62 mod 62 = 0 and your substr would then be "".

so i had the math built in to substract 1 from the char position, then do the modular math and then add 1. So it would be (62-1) mod 62 + 1 = 62. Makes sense?
_________________________
Eric