Jump to content

4 Letter incremental string generator


imperium2335

Recommended Posts

Hi,

 

What would be the best way to generate an incremental 4 letter string that would start off like this:

 

0A, 0B, 0C ....4AB, 4AC, 4AD....50A, 50B...53AA,53AB...7A0,7A1,7A2...etc etc and stop at something like 9999 or ZZZZ?

 

So I could get all possible combinations of letters and numbers really.

Link to comment
Share on other sites

Hi,

 

RAM isn't a problem for me, but what I want to happen is for it to go through every possible combination one by one.

 

I thought of an array but there will be so many like you said, 1.7mil!

 

Once they have gone through the loop they don't need to be stored.

 

As an example:

 


while($combination != $thelastpossiblecombination) {

echo $combination ;
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.