Hi.
I have a several numbers (1282 or 2845) which I want to encode "tinyurl"-code-style (gd2h or s9d5), because a big number could be displayed with a few letters. My idea:
I use an array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9') which contains all the letters and digits I want to use in my code.
My encoded numbers should look like this:
1 becomes a, 2 becomes b, 3 becomes c, ... , 36 becomes 9, 37 becomes aa, 38 becomes ab, 39 becomes ac.
I have no idea how to calculate it without a big loop. That of course would slow down the script a lot... perhaps you have an idea!
Thank you in advance!
Fox