/* Put in your connection and DB selection code here */
// Query the table
$qry = mysql_query("SELECT * FROM table");
$getqry = mysql_fetch_array($qry);
// Output the field names and value
foreach($getqry AS $k => $v){
echo $k." = ".$v."<br />";
}
Of course, this will output the field names fine, but only the last row of data that is pulled out. If your table has more than one row of data, and you want that, then you need to run it through a while loop.