title: Help using json_encode to produce specific format
body: <p>i want to use php's json_encode function to take data and produce the following format, but am struggling with it.</p>
  
  <p>Can anyone advise if this can be done via json_encode()? Thanks for any help!</p>
  
  <pre><code> 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}]}
  </code></pre>