Je veux aller de ces tableaux:Faire un tableau combiné récursive d'autres tableaux
$array1 = ["x", "y", "z"];
$array2 = ["a","b"];
$array3 = ["1","2","3","4","5","6"];
Pour ce tableau:
$arrayResult =
array(
array("x" => array("a" => array(1,2,3,4,5,6),
"b" => array(1,2,3,4,5,6)),
"y" => array("a" => array(1,2,3,4,5,6),
"b" => array(1,2,3,4,5,6)),
"z" => array("a" => array(1,2,3,4,5,6),
"b" => array(1,2,3,4,5,6)))
);
J'ai essayé de faire ce tableau combiné avec des approches de produits cartésiens, mais pas de résultat satisfaisant jusqu'à présent.
Nous vous remercions de toi r réponse! La complexité ici est que je ne sais pas combien de tableaux me seront fournis. Il est plus comme: '$ array1 = [ "x", "y", "z"];' '$ array2 = [ "a", "b"],' '$ array3 = [ » 1 "," 2 "," 3 "," 4 "," 5 "," 6 "];' '$ arrayN ...' – Laurent