title: Dynamically pass table header in json format bootstrap datatable
body: <p>I am creating data table from json data. Table data is getting fine. Now I want to pass table header with these json data.</p>
  
  <p>my data.php</p>
  
  <pre><code>&lt;?php
  include('config/db_i.php');
  $sql_sel = mysqli_query($con,"SELECT * FROM `tbl`");
  $array = array();
  $array['data'] = array();
  
  while($res_sel = mysqli_fetch_row($sql_sel)){
      $array['data'][] = $res_sel;
  }
  echo json_encode($array);
  ?&gt;
  </code></pre>
  
  <p>Now output coming like</p>
  
  <pre><code>{"data":[["1","John","USA"],["2","BOB","INDIA"],["3","James","UK"],["4","Dani","CHINA"]]}
  </code></pre>
  
  <p>I want to transfer columns values too...ie, ID,name,Country</p>