title: PHP, array count, two foreach combination
body: <p>I am solving this not understandable script, I even don't know where from to start. Maybe someone will help me.
  I got two arrays example:</p>
  
  <pre><code>$a1 = array(1,2,3 ...);
  $a2 = array(4,5,6 ...);
  </code></pre>
  
  <p>what I need is that first array will divide all values by itsel
  for this I would like to get script which will work like this (array values can be savet to the same name because will be anyway continue with them, can be new variable, in this example I use new). In the same way variable can be devidet by itself to get 1 but prefer not to. Example of count.</p>
  
  <pre><code>$b1 = array([0]/[1], [0]/[2], [0]/[3], [1]/[0], [1]/[2], [1]/[3], [2]/[0], [2]/[1], [2]/[3], [3]/[0], [3]/[1], [3]/[2]);
  $b2 = array( *** The same like $b1 ***);
  </code></pre>
  
  <p>On the end will go foreach to write values to table, this I solved already</p>
  
  <pre><code>echo "&lt;table&gt;&lt;tr&gt;";
      foreach($b1 as $key1 =&gt; $val1){
          foreach($b2 as $key2 =&gt;$val2){
  
             echo "&lt;td&gt;".$key1.$key2."&lt;br/&gt;".val1*val2."&lt;/td&gt;";
  
          }
          echo "&lt;/tr&gt;&lt;tr&gt;"; 
        }
      echo "&lt;/tr&gt;&lt;/table&gt;"
  </code></pre>
  
  <p>Anyone can give me a help to this issue?</p>