title: How can I iterate through two arrays at the same time without re-iterating through the parent loop?
body: <p>How can I iterate through two arrays at the same time that have equal sizes ?</p>
  
  <p>for example , first array <code>$a = array( 1,2,3,4,5);</code>
  second array <code>$b = array(1,2,3,4,5);</code></p>
  
  <p>The result that I would like through iterating through both is having the looping process going through the same values to produce a result like</p>
  
  <pre><code>  1-1
    2-2
    3-3
    4-4
    5-5
  </code></pre>
  
  <p>I tried to do it this way below but it didn't work , it keeps going through the first loop again</p>
  
  <pre><code>foreach($a as $content) {
      foreach($b as $contentb){
          echo $a."-".$b."&lt;br /&gt;"; 
      }
  }
  </code></pre>