PHPで2つの多次元配列を結合する方法は? 2 つの多次元配列 A と B があります。次のように、A と B を結合して新しい配列 C を形成する必要があります。
$A = array(
array("a1"=>1,"b1"=>2,"c1"=>"A"),
array("a1"=>1,"b1"=>16,"c1"=>"Z"),
array("a1"=>3,"b1"=>8,"c1"=>"A"));
$B = array(
array("a2"=>1,"b2"=>2,"b2"=>"A"),
array("a2"=>1,"b2"=>16,"b2"=>"G"),
array("a2"=>3,"b2"=>8,"b2"=>"A"));
// A と B を結合して C を形成する
$C=array(
array("a1"=>1,"b1"=>2,"c1"=>"A"),
array("a1"=>1,"b1"=>16,"c1"=>"Z"),
array("a1"=>3,"b1"=>8,"c1"=>"A"),
array("a2"=>1,"b2"=>2,"b2"=>"A"),
array("a2"=>1,"b2"=>16,"b2"=>"G"),
array("a2"=>3,"b2"=>8,"b2"=>"A"));