traversing array, which can be of multiple depth
<p>I have following array pattern. </p>

<pre><code>Array
(
[0] =&gt; Array
    (
        [label] =&gt; 2011
        [subtable] =&gt; Array
            (
                [0] =&gt; Array
                    (
                        [label] =&gt; 05
                        [subtable] =&gt; Array
                            (
                                [0] =&gt; Array
                                    (
                                        [label] =&gt; /hello-world.html
                                        [url] =&gt; http://example.com/2011/05/hello-world.html
                                    )

                                [1] =&gt; Array
                                    (
                                        [label] =&gt; /test-test-test.html
                                        [url] =&gt; http://example.com/2011/05/test-test-test.html
                                    )

                            )

                    )

                [1] =&gt; Array
                    (
                        [label] =&gt; 04
                        [subtable] =&gt; Array
                            (
                                [0] =&gt; Array
                                    (
                                        [label] =&gt; /i-have-some-problem-with-gfc-updates.html
                                        [url] =&gt; http://example.com/2011/04/i-have-some-problem-with-gfc-updates.html
                                    )

                                [1] =&gt; Array
                                    (
                                        [label] =&gt; /testing-for-google-frineds-update.html
                                        [url] =&gt; http://example.com/2011/04/testing-for-google-frineds-update.html
                                    )

                            )

                    )

                [2] =&gt; Array
                    (
                        [label] =&gt; /05
                        [url] =&gt; http://example.com/2011/05
                    )

                [3] =&gt; Array
                    (
                        [label] =&gt; /04
                        [url] =&gt; http://example.com/2011/04
                    )

            )

    )

[1] =&gt; Array
    (
        [label] =&gt; /index
        [url] =&gt; http://example.com/
    )
)
</code></pre>

<p>I want to get "label" and "url" into another array like</p>

<pre><code>array(
    [0] = array([label] =&gt; a [url] =&gt; http://example.com/a/)
    [1] = array([label] =&gt; b [url] =&gt; http://example.com/b/)
)
</code></pre>

<p>How can I achieve it using recursion, or by passing it to a function?</p>
