Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating an N x N array of integers that "staircase" and "wrap around"
    primarykey
    data
    text
    <p>I am having trouble trying to figure out how to get data ordered like below. The total numbers don't matter; it would follow the same pattern from any number in the logical order of 0, 1, 2, 3, 4, 5, 6, etc. So essentially, starting at 0, 2, 3, 4, etc. where 1 would be placed <em>after</em> the maximum number, and where 0 can be a variable I set statically. I am having issues with progressing all the way to max number and then continuing, <em>e.g.</em></p> <pre><code>..., 97, 98, 99, 100, 1, 2, ... </code></pre> <p>and then progressing with the order,</p> <pre><code>..., 98, 99, 100, 1, 2, 3, ... </code></pre> <p>and so on until 1, 2, 3, 4, 5, 6, ...</p> <p>and store this all into the multidimensional array below.</p> <pre><code>$set = array( array('0','0','0','0','0','0','0','0','0','0','0'), array('0','2','3','4','5','6','7','8','9','10','1'), array('0','3','4','5','6','7','8','9','10','1','2'), array('0','4','5','6','7','8','9','10','1','2','3'), array('0','5','6','7','8','9','10','1','2','3','4'), array('0','6','7','8','9','10','1','2','3','4','5'), array('0','7','8','9','10','1','2','3','4','5','6'), array('0','8','9','10','1','2','3','4','5','6','7'), array('0','9','10','1','2','3','4','5','6','7','8'), array('0','10','1','2','3','4','5','6','7','8','9'), array('0','1','2','3','4','5','6','7','8','9','10'), ); </code></pre> <p>I did the above because I couldn't figure out a looping pattern; if I could figure that out I wouldn't need to enter in the data manually and could create a form by which any number could be chosen, following this pattern.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload