I have a string that looks like so:

```
orders = "{1:2, 3:4, 23:45, 12:56}"

```

**These orders couplets can vary in length**

The first number on the left of colon is the ID and the second number is the quantity,
i.e, 12:56 = ID: 12 Quantity: 56.

It's in this string format so I can easily store it in a database as one big chunk.

I want to get the string in the format:

```
Array (
    ID => Quantity,
    ID => Quantity
)

```

Like; 

```
Array (
   1 => 2,
   3 => 4
)

```

So far, I have removed all the brackets with statement:

```
$string = substr(orders, 1, (strlen($intel['order']) - 2));

```

Then I have used the statement:

```
$chunks = explode(",", $string);

```

to give me : 
`Array (
 [0] => 1:2
 [1] => 3:4
)`

Is there a simpler way to format this array?
My second port of call was to use ANOTHER 
`$chunks2 = explode(":", $chunks);`
But I'm having trouble setting the index as the ID number..

Thanks guys.

---

-> Ultimatly, I will use a for loop to run multiple UPDATE SQL statements to change the 'stock' of an item to ('stock' - 'quantity') WHERE id = this id.