Unique number list
<p>I have an HTML form from which a user selects numbers using checkboxes. The numbers are put into an PHP array like this:</p>

<pre><code>&lt;input type="checkbox" name="formnumber[]" value="1" /&gt;
</code></pre>

<p>There are 24 numbers to pick from 1 to 24. I want to output a list of 10 unique lines with 5 unique numbers per line using the numbers from the array.</p>

<p>e.g.: I pick 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 from the form. The output would look like this:</p>

<pre class="lang-none prettyprint-override"><code>2 16 4 1 15
10 13 2 4 5
12 1 3 16 11

etc etc (10 lines)
</code></pre>
