title: PHP MySQL Get column names While iterating through all records
body: <pre><code>$query = mysql_query("SELECT * FROM mytable");
  
  while ($row = mysql_fetch_assoc($query)) {
     //How to echo column names and values here?
  }
  </code></pre>
  
  <p>Is it possible to echo a table's column names and values while iterating through the entire table in a <code>while</code> loop?</p>