In my project I am collecting information about products.the data structure I have in a multi dimensional array consists of productName,quantity,price,subtotal arrays. I want to select data from each of these rows vertically to collect sets of product related data.

**Right now: I got using print\_r($product\_data)**

```
Array(
        [productname] => Array ( [0] => 7 [1] => 8 ) 
        [quantity] => Array ([0] => 23 [1] => 22 ) 
        [price] => Array ( [0] => 2 [1] => 2 ) 
        [subtotal] => Array ( [0] => 46 [1] => 44 )
    )

```

**Desired:**

```
 Array(
        Array('p_id'=>7,'quantity'=>23,'unitPrice'=>2,'subTotal'=>46)
        Array('p_id'=>8,'quantity'=>22,'unitPrice'=>2'subTotal'=>44)
    )

```

and can anybody suggest a better title for this post? thanks in advance