title: Matrix arrangement issues in php
body: <p>I would like to know some solutions to such a problem.</p>
  
  <p>It is given a number lets say 16 and you have to arrange a matrix this way </p>
  
  <pre><code>1  2  3  4
  12 13 14 5
  11 16 15 6
  10 9  8  7
  </code></pre>
  
  <p>the language doesn't matter, (preferably PHP);</p>