how to dice up the array <p>I have an array like this (below is the var_dump)</p> <pre><code>array 0 =&gt; object(stdClass)[11] public 'VN' =&gt; string '571.5' (length=5) public 'color' =&gt; string 'GREEN' (length=5) public 'name' =&gt; string 'CIRRHOSIS' (length=9) public 'icd9ID' =&gt; string '5765' (length=4) public 'ID' =&gt; string '46741' (length=5) 1 =&gt; object(stdClass)[12] public 'VN' =&gt; string '571.5' (length=5) public 'color' =&gt; string 'GREEN' (length=5) public 'name' =&gt; string 'CIRRHOSIS' (length=9) public 'icd9ID' =&gt; string '5765' (length=4) public 'sortOrder' =&gt; string '1' (length=1) public 'ID' =&gt; string '46742' (length=5) 2 =&gt; object(stdClass)[15] public 'VN' =&gt; string 'V58.69' (length=6) public 'color' =&gt; string 'ORANGE' (length=6) public 'name' =&gt; string 'Long-term (current) use of other medications' (length=44) public 'icd9ID' =&gt; string '15116' (length=5) public 'ID' =&gt; string '46741' (length=5) 3 =&gt; object(stdClass)[14] public 'VN' =&gt; string '070.32' (length=6) public 'color' =&gt; string 'GREEN' (length=5) public 'name' =&gt; string 'HEPATITIS B CHRONIC' (length=19) public 'icd9ID' =&gt; string '14463' (length=5) public 'ID' =&gt; string '46742' (length=5) 4 =&gt; object(stdClass)[13] public 'VN' =&gt; string '070.32' (length=6) public 'color' =&gt; string 'GREEN' (length=5) public 'name' =&gt; string 'HEPATITIS B CHRONIC' (length=19) public 'icd9ID' =&gt; string '14463' (length=5) public 'ID' =&gt; string '46741' (length=5) </code></pre> <p>I want to two HTML tables. One that will carry all the same ID and second one will carry the other ID</p> <p>How can I do that Thanks!</p>