title: mysql_field_name to the new mysqli
body: <p>I have a way to get the name of the columns of a table. It works fine but now I want to update to the new mysqli ? (I tried the mysqli_fetch_field but I don't know how to apply to this case and I am not sure if it is the wright option)</p>
  
  <p>How to do the same with mysqli ? :</p>
  
  <pre><code>$sql = "SELECT * from myTable";
  $result = mysql_query($sql,$con);
  $id = mysql_field_name($result, 0);
  $a = mysql_field_name($result, 1);
  
  echo $id;
  echo $a;
  </code></pre>