Generating all possible letter and number combinations

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
oomwrtu
Forum Newbie
Posts: 1
Joined: Sun Jul 03, 2005 5:01 pm
Location: NC, USA
Contact:

Generating all possible letter and number combinations

Post by oomwrtu »

OK, I have somewhat of an unorthodox question (yes, I've tried to search the internet and the forums here) so I understand if no one can come up with a solution.

I am trying to generate strings from 0 (just zero) all the way up to ZZZZZZZZZZZZ (that is twelve Zs the number can be flexible though). I would like to be able to pick a place to start from such as AAAA and a place to end such as CCCC (I think I might be able to figure that part out). I realize that generating a large chunk of these would take a long time (as in hours on end, probably more) which is why I would like to be able to start in the middle and choose an ending place.

So far, I haven't really gotten anywhere. I was going to try and use ASCII codes so I could simply add one each time but 0-9, a-z, and A-Z are not next to each other. Even if you don't know/want to write the code, a written explanation would be much appreciated as well.

Thank you for any help in advance.

oom
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

viewtopic.php?t=55043 may be of interest.
Post Reply