use desc tablename Store it in an array and get the field name from $array['Field']; Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:gary.every@ingramentertainment.com http://accessingram.com > -----Original Message----- > From: Chris Payne [mailto:chris@planetoxygene.com] > Sent: Friday, April 11, 2003 2:29 PM > To: php > Subject: Tables etc ..... > > > Hi there everyone, > > Does anyone have any example code of how to get column names > from a mysql table without knowing how many columns there > are? Basically what I need to be able to do is to display > the contents of a database without knowing the column names > as i'm trying to write something to manage my databases and > i'd rather try it myself rather than use phpmyadmin all the > time as you don't learn anything that way. > > Thanks everyone :-) > > Chris >