title: mysql_fetch_array echo to json
body: <p>I trying to figure out how to output my php to echo for my json file.</p>
  
  <pre><code>&lt;?php
  $sql_query = "SELECT * FROM some_data";
  $result = mysql_query($sql_query);
  $total_rows = mysql_num_rows($result);
  $dataList_desc = '';
  $dataList_view = '';
      while($row = mysql_fetch_array($result)) {
              $video_desc = $row["video_desc"];
              $video_views = $row["video_views"];
              $dataList_desc .= '' . $video_desc . '';
              $dataList_view .= '' . $video_views . '';
              echo "[[\" \", \"" . $dataList_desc . "\",],[\" \", \"" . $dataList_view . "\",]";
  
      }
    mysql_close($con);
  ?&gt;
  </code></pre>
  
  <p>My output is:</p>
  
  <pre><code>[[" ", "Title 1",],[" ", "1000",][[" ", "Title 1Title 2",],[" ", "1000906",][[" ", "Title 1Title 2Title 3",],[" ", "10009061150",][[" ", "Title 1Title 2Title 3Title 4",],[" ", "100090611501800",][[" ", "Title 1Title 2Title 3Title 4Title 5",],[" ", "100090611501800756",][[" ", "Title 1Title 2Title 3Title 4Title 5Title 6",],[" ", "100090611501800756558",]
  </code></pre>
  
  <p>What I need is:</p>
  
  <pre><code>[["", "Title 1", "Title 2", "Title 3", "Title 4", "Title 5", "Title 6"],["", 1000, 903, 1150, 1800, 756, 558]]
  </code></pre>
  
  <p>Please help.</p>