title: Multiplying two arrays in php
body: <p>I have a challenge multiplying two arrays.
  this is what i intend doing</p>
  
  <pre><code>Array1 ( [0] =&gt; 2 [1] =&gt; 2 )
  Array2 ( [0] =&gt; 8000.00 [1] =&gt; 1234.00 )
  </code></pre>
  
  <p>Every time i multiply this it breaks it down into 4 and returns a result as this</p>
  
  <pre><code>Array ( [0] =&gt; 16000 [1] =&gt; 16000 [2] =&gt; 2468 [3] =&gt; 2468 )
  </code></pre>
  
  <p>However when i pass single a single data it gets it right.
  Here is my code, i'll appreciate any help i can get. Thanks</p>
  
  <pre><code>$total = array();
  foreach($office_price as $price){
      foreach($office_quantity as $quantity){
          $total[] = $price * $quantity;
      }
  }
  </code></pre>