title: How to use foreach loop using two array to get result
body: <p>I have two array as follow</p>
  
  <pre><code>[1]=&gt;Array(
      [ingrediant]=&gt;Array(
          [A]=&gt;Chicken [C]=&gt;TomatoJuice
          )
      [price]=&gt; 100
      )
  [2]=&gt;Array(
      [ingrediant]=&gt;Array(
          [A]=&gt;Pork  [C]=&gt;LimeJuice
          )
      [price]=&gt; 50
      )
  [3]=&gt;Array(
      [ingrediant]=&gt;Array(
          [B]=&gt;Chille [C]=&gt;TomatoJuice
      )
      [price]=&gt;100
  
      )
  )
  </code></pre>
  
  <p>And</p>
  
  <pre><code>Array([A]=&gt;Array([name]=&gt;meat [code]=&gt;001)
         [B]=&gt;Array([name]=&gt;Vegetable [code]=&gt;002)
         [C]=&gt;Array([name]=&gt;Juice [code]=&gt;003)
  )
  </code></pre>
  
  <p>First Array Show the food combo and Second Array Show Type of the Ingredients
  For example,</p>
  
  <blockquote>
    <p>Chicken+tomatojuice Combo</p>
  </blockquote>
  
  <p>Chicken is meat and tomatojuice is juice.
  I would like to get the result as follow group by juice.</p>
  
  <pre><code>&gt;Tomatojuice 
  -Meat:Chicken, price:100
  -Vegetable:Chille, price:100
  &gt;LimeJuice
  -Meat:Pork, price:100
  </code></pre>
  
  <p>How can I get these results by using php foreach. I have tried several time.Not Okay at all.</p>