I am trying to list the column names of a database file that I have created and display it in a table on a website I am creating. So far the only code I have found to display the names is the metadata function:
foreach(sqlsrv_field_metadata($result) as $meta) {
foreach($meta as $name => $value) {
echo "$name: $value";
}
echo "<br />";
}
This code is working well in getting the values of the columns; however, I just want it to display the name of the column not all the other values that come with this function. Any ideas on how to do this or maybe there is a better function to acomplish this? Thanks