How can I generate an incremental id in php mixing numbers, lower and upper letters?
For example, I tried:
$hello = "aaa0";
for ($i=0; $i < 10000; $i++) {
echo $hello++;
echo "<br>";
}
Then, it returns;
aaa0
aaa1
aaa2
...
aaa9
aab0
aab1
I would like to generate strings as:
aaa0
aaa1
aaa2
...
aaaa
aaab
aaac
...
aaaz
aaaA
First numbers from 0 to 9, then chars from a to z, then chars from A to Z. Each positional char should go in this range.
How can I do it?
EDIT: I want every character in the string varies within this range. I want to go from 0 to 9, then a to z, then A to Z. When it ends, the char go to 0, and the char in the left increments in one. For example:
0000
0001
0002
...
0009
000a
000b
...
000y
000z
000A
000B
...
000X
000Z
0010
0011
0012
....
0019
001a