title: calculate next line numbers
body: <p>Weird question I guess.. But I am not very math wiz - soo here goes..</p>
  
  <p>I am trying to create a patterne (or variable patterns based on selection) based on x and y numbers (2 rows and 4 columns) and the direction of the counting of x numbers</p>
  
  <p>All in PHP ;-)</p>
  
  <p>like:</p>
  
  <pre><code>1-2-3-4
  5-6-7-8
  </code></pre>
  
  <p>That one is easy, when number of x-columns is reached, next line and continue x count.</p>
  
  <p>But with eg. this one (still 2 rows and 4 columns):</p>
  
  <pre><code>1-2-3-4
  8-7-6-5
  </code></pre>
  
  <p>upsie.. what if it is eg. 3++ rows and still 4 columns?</p>
  
  <pre><code>1-2-3-4
  8-7-6-5
  9-10-11-12
  </code></pre>
  
  <p>what would be the formula for this - or other possible variations (teaser for variations):</p>
  
  <pre><code>9-10-11-12
  8-7-6-5
  1-2-3-4
  </code></pre>
  
  <p>or reversed</p>