Credo che questo fa fondamentalmente quello che stai dopo.
<?php
$chars = 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',
'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');
$increment1 = 0;
$increment2 = 0;
for ($i = 0; $i <= 200; $i++) {
if ($increment2 === 62) {
$increment1++;
$increment2 = 1;
} else {
$increment2++;
}
echo "{$chars[$increment1]}{$chars[$increment2]} ";
}
/*
Output:
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
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 aa ab ac ad ae af ag ah ai aj ak al
am an ao ap aq ar as at au av aw ax ay az aA aB aC aD aE
aF aG aH aI aJ aK aL aM aN aO aP aQ aR aS aT aU aV aW aX
aY aZ a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 ba bb bc bd be bf bg
bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz
bA bB bC bD bE bF bG bH bI bJ bK bL bM bN bO bP bQ bR bS
bT bU bV bW bX bY bZ b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ca cb
cc cd ce cf cg ch ci cj ck cl cm cn co
*/
+1, interessante a questa domanda. – Giberno
Non sapevo che PHP l'abbia fatto, ma lo faccio ora. http://php.net/manual/en/language.operators.increment.php –
Qual è la progressione desiderata? Voglio dire, 'a b c ... x y z A B C ... X Y Z 0 1 2 ... 7 8 9 aa' non lo è, ovviamente. Quindi quali personaggi variano più velocemente e in quale ordine? –