title: putting a foreach inside foreach
body: <p>I'm trying to loop some array using <code>foreach</code>.
  This is the code which demonstrates what I'm doing:</p>
  
  <pre><code> $arr1=array("32,45,67,89");
      $arr2=array("5,3,2,1");
  
      foreach($arr1 as $key =&gt; $val){
        foreach($arr2 as $key2 =&gt;$val2){
           echo $val."-".$key2."-".$val2;
          }
  }
  </code></pre>
  
  <p>However, this outputs</p>
  
  <blockquote>
    <p>32-0-5          </p>
    
    <p>32-1-3</p>
    
    <p>32-2-2</p>
    
    <p>32-3-1</p>
  </blockquote>
  
  <p>and I want to display it like this instead</p>
  
  <blockquote>
    <blockquote>
      <p>32-1-5</p>
      
      <p>45-2-3</p>
      
      <p>67-3-2</p>
      
      <p>89-3-1</p>
    </blockquote>
  </blockquote>
  
  <p>How can I solve this? Since I'm a beginner I don't know what to do.</p>