title: Creating a jSON object using php loop
body: <p>I am trying to create a quick object for working with a graph I am making.</p>
  
  <p>This is what the output looks like:</p>
  
  <pre><code>[
    ['Firefox',   45.0],
    ['IE',       26.8],
    ['Safari',    8.5],
    ['Opera',     6.2],
    ['Others',   0.7]
  ]
  </code></pre>
  
  <p>My code / loop that I need to use to create this data:</p>
  
  <pre><code>$series = Array();
  foreach($segmentData-&gt;segment as $segment){ 
  
      echo $segment-&gt;segmentName . ' has ' . $segment-&gt;total . '&lt;br /&gt;';
      //Need to create the data here
  
  }
  </code></pre>