clear empty spaces array <p>I have this array, and I want go get rid of those indexes that have no value in them, so for example in the index[0] I want to get rid of the [0] and [4] so I would have a 3 value array and so on...</p> <pre><code>Array ( [0] =&gt; Array ( [0] =&gt; [1] =&gt; [2] =&gt; 7 [3] =&gt; [4] =&gt; 8 [5] =&gt; ) [1] =&gt; Array ( [0] =&gt; [1] =&gt; [2] =&gt; 9 [3] =&gt; 10 [4] =&gt; ) [2] =&gt; Array ( [0] =&gt; [1] =&gt; 11 [2] =&gt; 12 [3] =&gt; ) ) </code></pre>