have done this. but something is a bit wrong. it only seems to be printing one letter for each sub?
http://pod-185.dolphin-server.co.uk/Reapit/hgasite/hg_php/hg_start_b.php
if (!$result) {
echo "DB Error, could not list tables\n";
echo 'MySQL Error: ' . mysql_error();
exit;
}
while ($row = mysql_fetch_row($result)) {
echo "<BR><b>Table: $row[0]</b><BR>";
$resultx = mysql_query("SHOW COLUMNS FROM $row[0]");
if(!$resultx) {
echo 'Could not run query: ' . mysql_error();
exit;
}
if (mysql_num_rows($resultx) > 0) {
while ($rowx = mysql_fetch_assoc($resultx)) {
// print_r($rowx);
foreach($rowx as $sub) {
echo $sub['Field'];
}
}
}