I have the following problem:
I have an php array looking like this:
Array (
[0] => Array (
[0] => Array ( [sales_count] => 2 )
[1] => Array ( [customer_id] => 1 )
)
[1] => Array (
[0] => Array ( [sales_count] => 3 )
[1] => Array ( [customer_id] => 2 )
)
)
Now if I use json_encode on this array, I get the following result:
[[{"sales_count":"2"},{"customer_id":"1"}],[{"sales_count":"3"},{"customer_id":"2"}]]
However, I'm trying to get the following output:
[{"sales_count":"2","customer_id":"1"},{"sales_count":"3","customer_id":"2"}]
How can I accomplish this? I already read through a lot of similar questions, I used their answers to get to this point, however I found no solution for this output.
Thanks a lot in advance!