title: PHP merge arrays by value for 2 different array value
body: <p>I have tried to merge two different arrays into a single array. Can any one help me please?</p>
  
  <p>i have array like this</p>
  
  <pre><code>[0] (Array)#2
    [rank] "579"
    [id] "1"
  [1] (Array)#4
    [rank] "251"
    [id] "2"
  
  [0] (Array)#2
    [size] "S"
    [rank] "251"
  [1] (Array)#15
    [size] "L"
    [rank] "579"
  </code></pre>
  
  <p>i need like this</p>
  
  <pre><code>[0] (Array)#2
    [size] "S"
    [rank] "251"
    [id] "1"
  [1] (Array)#15
    [size] "L"
    [rank] "579"
    [id] "1"
  </code></pre>