create new array by cutting key from an existing array over to the new array
<p>i want to take an array and cut some of the keys from it (not in order) and create a new array from them.</p>

<p>I have doing it using the <code>array_shift()</code> function, but came to a point where the next key needed to be skipped and then do the array_shift again.</p>

<p>How can I logically tackle this?</p>

<p>my array</p>

<pre><code>Array
(
    [api] =&gt; Array
        (
            [0] =&gt; system
            [1] =&gt; assets
            [2] =&gt; theme
            [3] =&gt; resources
            [4] =&gt; api
            [5] =&gt; xml
            [6] =&gt; json
            [7] =&gt; jsonp
            [8] =&gt; request
        )

    [class] =&gt; Array
        (
            [name] =&gt; authentication
            [abbr] =&gt; auth
        )

    [directories] =&gt; Array
        (
            [application] =&gt; application
            [mvc] =&gt; Array
                (
                    [model] =&gt; model
                    [view] =&gt; view
                    [controller] =&gt; controller
                )

            [assets] =&gt; Array
                (
                    [folder] =&gt; assets
                    [css] =&gt; css
                    [img] =&gt; img
                    [js] =&gt; js
                )

            [config] =&gt; config
        )

    [smarty] =&gt; Array
        (
            [security] =&gt; on
            [delimiter] =&gt; Array
                (
                    [left] =&gt; {!
                    [right] =&gt; !}
                )

            [template] =&gt; Array
                (
                    [header] =&gt; header
                    [footer] =&gt; footer
                    [extension] =&gt; tpl
                )

        )

    [version] =&gt; Array
        (
            [component] =&gt; Array
                (
                    [0] =&gt; Array
                        (
                            [name] =&gt; CMS
                            [version] =&gt; 1.0
                        )

                    [1] =&gt; Array
                        (
                            [name] =&gt; TinyMCE jQuery Package
                            [version] =&gt; 3.5
                        )

                    [2] =&gt; Array
                        (
                            [name] =&gt; jQuery
                            [version] =&gt; 1.7.2
                        )

                )

            )
)
</code></pre>

<p>I need to make a new array from they keys: <code>api</code>, <code>class</code>, <code>version</code></p>
