title: merge two arrays have a common key
body: <p>I have two Json arrays :</p>
  
  <pre><code>$arrayA = array("avg" =&gt; '1',"shape" =&gt; 'hey');
  
  $arrayB = array("avg" =&gt; '2',"shape" =&gt; 'trapezoid');
  </code></pre>
  
  <p>I want to combine them using <code>javascript</code> or <code>PHP</code> as :</p>
  
  <pre><code>arrayAB = {"avg":['1', '2'], "shape":[hey', 'trapezoid']};  
  </code></pre>