How To Group and Sort Array element base Specific Character : <p>i have an array Like This :</p>

<pre><code>array("10", "1001","12", "1201","1002", "1202","120101", "120201","13");
</code></pre>

<p>i need Loop in Php  to  sort and group with Two Character of value to output Like This :</p>

<pre>
-10
        --1001
        --1002

-12

        --1201
                    --- 120101
        --1202
                   --- 120201
-13
</pre>

<p>Thanks!</p>
