开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜