I am accessing a json decoded array

```
$orders = json_decode($response, true);

```

And then within the an array called DATA, I am going through each order and finding the Total key.

```
// access the common array
$orders = $orders['data'];

// access the total of each order
$sale1 = $orders[0]['total'];
$sale2 = $orders[1]['total'];
$sale3 = $orders[2]['total'];
$sale4 = $orders[3]['total'];
$sale5 = $orders[4]['total'];
$sale6 = $orders[5]['total'];
$sale7 = $orders[6]['total'];

```

Then i'm adding them up to get the combined total of all orders.

```
// add up all orders to find total
echo $sale1 + $sale2 + $sale3 + $sale4 + $sale5 + $sale6

```

I cant figure out how to make this into a loop.

Here is my array:

```
array(3) {

   [0]=>
   array(53) {
    ["total"]=>
     int(100)
    }

   [1]=>
   array(53) {
    ["total"]=>
     int(100)
    }

}

```