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
https://forums.phpfreaks.com/topic/236520-4-letter-incremental-string-generator/
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 ;
}

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.