az、0-9 の配列を作成しようとしていますが、それぞれに同じ配列のサブセットがあります。
いいえ:
array(
"a"=>array("a","b","c"..."0","1","2")
"b"=>array("a","b","c"..."0","1","2")
"c"=>array("a","b","c"..."0","1","2")
"d"=>array("a","b","c"..."0","1","2")
"0"=>array("a","b","c"..."0","1","2")
"1"=>array("a","b","c"..."0","1","2")
"2"=>array("a","b","c"..."0","1","2")
"3"=>array("a","b","c"..."0","1","2")
)
私がこれを試しているところ
$finalArr = array();
$letterArr = range('a', 'z');
$numericArr = range(0,9);
$startArr = array_merge($letterArr, $numericArr);
foreach($startArr as $key => $val)
{
$finalArr[$val] = $startArr;
foreach($finalArr[$val] as $key2 => $val2)
{
$finalArr[$val][$val2] = $startArr;
}
}
しかし、それは最初のパスでしか機能しません...その後、混乱し始めます。何か案は?