title: Showing nested for loops in a flowchart
body: <p>How could I show a nested loop in a flowchart?</p>
  
  <p>I want to show a nested foreach loop in a flowchart that shows something like this</p>
  
  <pre><code>foreach($array as $item) {
      foreach($SecondArray as $key=&gt;$value) {
          // Do stuff...
      }
  }
  </code></pre>
  
  <p>Now correct me if I'm wrong, but there is no way to show a foreach loop in a flowchart, so I'd need to show a for loop in the diagram(?) So the algorithm should be shown as something more like:</p>
  
  <pre><code>for ($i = 0; $i &lt; count($array); i++) {
      for ($j = 0; $j &lt; count($arrayTwo); $j++) {
          // Do stuff...
      }
  }
  </code></pre>
  
  <p>Now looking at the answers to this question (<a href="https://stackoverflow.com/questions/879250/how-to-picture-for-loop-in-block-representation-of-algorithm">How to picture “for” loop in block representation of algorithm</a>), a single for loop could be shown like this:</p>
  
  <p><a href="https://i.stack.imgur.com/fFnUJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fFnUJ.png" alt="Flowchart for single loop"></a></p>
  
  <p>But I cannot think of any way in which I could show a nested loop (to show the code I wrote above).</p>
  
  <p>Any suggestions?</p>