title: How to create 2D from 1D array with loop and manipulation?
body: <p>How to create a 2-dimensional from a 1-dimensional array in PHP?<br>
  For example I have one array as :</p>
  
  <pre><code>$a = Array
          (
              [0] =&gt; qwer
              [1] =&gt; asdfg
          )
  </code></pre>
  
  <p>And I want to convert it to be like this :</p>
  
  <pre><code>$b = Array
      (
          [0] =&gt; array
                 (
                    [0] =&gt; qw
                    [1] =&gt; we
                    [2] =&gt; er
                 )
          [1] =&gt; array 
                (
                    [0] =&gt; as
                    [1] =&gt; sd
                    [2] =&gt; df
                    [3] =&gt; fg
                )
      )
  </code></pre>
  
  <p>Thank you very much for your answer.</p>