create a php array from another multidensional array : <p>So i have the following array:</p>

<pre><code>Array
(
[22] =&gt; Array
    (
        [price] =&gt; 35
        [qty] =&gt; 2
    )
[21] =&gt; Array
    (
        [price] =&gt; 18
        [qty] =&gt; 1
    )
[49] =&gt; Array
    (
        [price] =&gt; 12
        [qty] =&gt; 2
    )
)
</code></pre>

<p>I would like to create an array like so, from the above data:</p>

<pre><code> Array
    (
    [0] =&gt; 35
    [1] =&gt; 35
    [2] =&gt; 18
    [3] =&gt; 12
    [4] =&gt; 12   
    )
</code></pre>

<p>This basically gets the "price" key value and adds it to the new array the amount of times stated in the "qty" key value. Whats the best way of achieving this?</p>
