Question: I am trying to get all product that are in my client's seller account. The problem is that Amazon MWS ListMatchingProducts api call returns a response of maximum 10 products. Actually I want to get all products that are in the seller's account. I have tried hard to find a solution for several days. Any helpful suggestion will be highly appreciated and thanked.

Answer: 
Using `foreach` loop 

```
$result = array();
$i = 0;
foreach($arr as $key => $value){
    $result[$i]['column'] = $key;
    $result[$i]['value'] = $value;
    $i++;
}
echo json_encode($result);

```

And using `array_map`

```
$result = array_map(function($k,$v){return array('column' => $k,'value' => $v);},  array_keys($arr),$arr);
echo json_encode($result);

```

[**DEMO**](https://eval.in/371261)
Simply Generate the array like that and return - 

```
$newArray = array_map(function($value, $key){
    return array('column' => $key, 'value' => $value);
}, $array, array_keys($array));

json_encode($newArray);

```