title: how to join two multidimensional arrays in php
body: <p>how to join two multidimensional arrays in php? I have two multidimensional arrays A and B. I need to join A and B to form a new array C as follows</p>
  
  <pre><code>$A = array( 
  array("a1"=&gt;1,"b1"=&gt;2,"c1"=&gt;"A"), 
  array("a1"=&gt;1,"b1"=&gt;16,"c1"=&gt;"Z"), 
  array("a1"=&gt;3,"b1"=&gt;8,"c1"=&gt;"A")); 
  
  $B = array( 
  array("a2"=&gt;1,"b2"=&gt;2,"b2"=&gt;"A"), 
  array("a2"=&gt;1,"b2"=&gt;16,"b2"=&gt;"G"), 
  array("a2"=&gt;3,"b2"=&gt;8,"b2"=&gt;"A")); 
  </code></pre>
  
  <p>//join A and B to form C</p>
  
  <pre><code>$C=array( 
  array("a1"=&gt;1,"b1"=&gt;2,"c1"=&gt;"A"), 
  array("a1"=&gt;1,"b1"=&gt;16,"c1"=&gt;"Z"), 
  array("a1"=&gt;3,"b1"=&gt;8,"c1"=&gt;"A"),
  array("a2"=&gt;1,"b2"=&gt;2,"b2"=&gt;"A"), 
  array("a2"=&gt;1,"b2"=&gt;16,"b2"=&gt;"G"), 
  array("a2"=&gt;3,"b2"=&gt;8,"b2"=&gt;"A"));
  </code></pre>