I want to build a json object with PHP. The json object needs to be like this (for creating a google line charts):
{"cols":[{"id":"bingo","label":"bingo","type":"string"},{"id":"value","label":"value","type":"number"}],"rows":[{"c":[{"v":"date1"},{"v":151}]},{"c":[{"v":"date2"},{"v":102}]},{"c":[{"v":"date3"},{"v":52}]},{"c":[{"v":"date4"},{"v":32}]},{"c":[{"v":"date5"},{"v":7}]},{"c":[{"v":"date5"},{"v":7}]},{"c":[{"v":"date5"},{"v":7}]}]}
I have a problem creating the following part:
{"c":[{"v":"date3"},{"v":52}]},{"c":[{"v":"date4"},{"v":32}]},{"c":[{"v":"date5"},{"v":7}]},{"c":[{"v":"date5"},{"v":7}]},{"c":[{"v":"date5"},{"v":7}]}
How can I create this with PHP?