Displaying table field/column names

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fstrnu
Forum Newbie
Posts: 11
Joined: Fri Dec 19, 2003 9:11 am

Displaying table field/column names

Post by fstrnu »

Hello.

I am attempting to display the contents of a table and, naturally, would like to include the column/field names at the top of the output. The following code with print out the 1st column name, so I am getting close, and have tried several ways to get it to print the remaining columns, but no luck. Help, please. Many thanks in advance....


$columns = odbc_columns ($connection, "PC.mdb", "", "results");

$item = odbc_result($columns, 4);

print "$item";
Post Reply