Consider three associative arrays in php:
$a1 = array(
"a" => "1",
"b" => "2",
"c" => "3"
);
$a2 = array(
"d" => "4",
"e" => "5",
"f" => "6"
);
$a3 = array(
"g" => "7",
"h" => "8",
"i" => "9"
);
How would you efficiently combine these into a multidimensional array as follows:
$result = array(
"1" => array("4","7"),
"2" => array("5","8"),
"3" => array("6","9")
);
Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…