change Array to another format
<pre><code>Array
(
    [0] =&gt; 46-sen1-Grid1-138
    [1] =&gt; 47-sen2-Grid1-138
    [2] =&gt; 50-sen5-Grid2-144
    [3] =&gt; 51-sen6-Grid2-144
)
</code></pre>

<p>How to make the above array as following? Thanks in advance!</p>

<pre><code>Array
(
    [138] =&gt; Array
        (
            [0] =&gt; 46-sen1
            [1] =&gt; 47-sen2
        )

    [144] =&gt; Array
        (
            [0] =&gt; 50-sen5
            [1] =&gt; 51-sen6
        )

)
</code></pre>
