Help using json_encode to produce specific format
i want to use php's json_encode function to take data and produce the following format, but am struggling with it.
开发者_C百科Can anyone advise if this can be done via json_encode()? Thanks for any help!
data: [{
x: 3,
y: 0
},
{
x: 10,
y: 0
}]
},
{
data: [{
x: 11,
y: 0
},
{
x: 13,
y: 0
}]
},
{
data: [{
x: 12,
y: 1},
{
x: 17,
y: 1}]}
http://codepad.org/6V0sWURY
精彩评论