$query = mysql_query("SELECT * FROM mytable");
while ($row = mysql_fetch_assoc($query)) {
//How to echo column names and values here?
}
Is it possible to echo a table’s column names and values while iterating through the entire table in a while loop?
You can use foreach loop